以下成員源於類 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 某個 Widget 在桌麵幾何體中。 QDesktopWidget 擁有各種用於獲得桌麵上有用幾何體的函數,譬如 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 ().