以下成员源于类 QApplication 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(obsolete)
enum
|
ColorSpec { NormalColor, CustomColor, ManyColor } |
(obsolete)
globalStrut
: QSize
(obsolete)
int
|
colorSpec () |
(obsolete)
QDesktopWidget *
|
desktop () |
(obsolete)
QSize
|
globalStrut () |
(obsolete)
bool
|
keypadNavigationEnabled () |
(obsolete)
void
|
setColorSpec (int spec ) |
(obsolete)
void
|
setGlobalStrut ( const QSize & ) |
(obsolete)
void
|
setKeypadNavigationEnabled (bool enable ) |
This enum is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
常量 | 值 | 描述 |
---|---|---|
QApplication::NormalColor
|
0
|
the default color allocation policy |
QApplication::CustomColor
|
1
|
the same as NormalColor for X11; allocates colors to a palette on demand under Windows |
QApplication::ManyColor
|
2
|
the right choice for applications that use thousands of colors |
见 setColorSpec () for full details.
This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
此特性保持用户可以与之交互的任何 GUI 元素应有的最小大小
例如,不应将按钮大小重置成小于全局结构大小。应考虑结构大小,当重实现可以用于触摸屏 (或类似 I/O 设备) 的 GUI 控件时。
范例:
QSize MyWidget::sizeHint() const { return QSize(80, 25); }
默认情况下,此特性包含 QSize 对象具有 0 宽度和高度。
访问函数:
QSize | globalStrut () |
void | setGlobalStrut ( const QSize & ) |
[static]
int
QApplication::
colorSpec
()
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the color specification.
另请参阅 QApplication::setColorSpec ().
[static]
QDesktopWidget
*QApplication::
desktop
()
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
返回桌面 Widget (也称根窗口)。
桌面可能由多个屏幕组成,因此它将是不正确的,例如:试图 center some widget in the desktop's geometry. QDesktopWidget has various functions for obtaining useful geometries upon the desktop, such as QDesktopWidget::screenGeometry () 和 QDesktopWidget::availableGeometry ().
[static]
bool
QApplication::
keypadNavigationEnabled
()
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
返回
true
if Qt is set to use keypad navigation; otherwise returns false. The default value is false.
This feature is available in Qt for Embedded Linux, and Windows CE only.
注意: On Windows CE this feature is disabled by default for touch device mkspecs. To enable keypad navigation, build Qt with QT_KEYPAD_NAVIGATION defined.
另请参阅 setKeypadNavigationEnabled () 和 navigationMode ().
[static]
void
QApplication::
setColorSpec
(
int
spec
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the color specification for the application to spec .
This call has no effect.
The color specification controls how the application allocates colors when run on a display with a limited amount of colors, e.g. 8 bit / 256 color displays.
The color specification must be set before you create the QApplication 对象。
The options are:
On Windows, Qt creates a Windows palette, and fills it with a color cube.
Be aware that the CustomColor and ManyColor choices may lead to colormap flashing: The foreground application gets (most) of the available colors, while the background windows will look less attractive.
范例:
int main(int argc, char *argv[]) { QApplication::setColorSpec(QApplication::ManyColor); QApplication app(argc, argv); ... return app.exec(); }
另请参阅 colorSpec ().
[static]
void
QApplication::
setKeypadNavigationEnabled
(
bool
enable
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets whether Qt should use focus navigation suitable for use with a minimal keypad.
This feature is available in Qt for Embedded Linux, and Windows CE only.
注意: On Windows CE this feature is disabled by default for touch device mkspecs. To enable keypad navigation, build Qt with QT_KEYPAD_NAVIGATION defined.
另请参阅 keypadNavigationEnabled () 和 setNavigationMode ().