Obsolete Members for QApplication

The following members of class QApplication are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(obsolete) dumpObjectInfo()
(obsolete) dumpObjectTree()

Static Public Members

(obsolete) int colorSpec()
(obsolete) flush()
(obsolete) hasPendingEvents()
(obsolete) Qt::LayoutDirection keyboardInputDirection()
(obsolete) QLocale keyboardInputLocale()
(obsolete) bool keypadNavigationEnabled()
(obsolete) void setColorSpec(int spec)
(obsolete) void setGraphicsSystem(const QString &)
(obsolete) void setKeypadNavigationEnabled(bool enable)
(obsolete) translate(const char *context, const char *key, const char *disambiguation, QCoreApplication::Encoding encoding, int n)

Member Function Documentation

[static] int QApplication::colorSpec()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the color specification.

See also QApplication::setColorSpec().

[static] Qt::LayoutDirection QApplication::keyboardInputDirection()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the current keyboard input direction. Replaced with QInputMethod::inputDirection()

This function was introduced in Qt 4.2.

See also QInputMethod::inputDirection().

[static] QLocale QApplication::keyboardInputLocale()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the current keyboard input locale. Replaced with QInputMethod::locale()

This function was introduced in Qt 4.2.

[static] bool QApplication::keypadNavigationEnabled()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns 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.

Note: On Windows CE this feature is disabled by default for touch device mkspecs. To enable keypad navigation, build Qt with QT_KEYPAD_NAVIGATION defined.

See also setKeypadNavigationEnabled() and navigationMode().

[static] void QApplication::setColorSpec(int spec)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

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 object.

The options are:

  • QApplication::NormalColor. This is the default color allocation strategy. Use this option if your application uses buttons, menus, texts and pixmaps with few colors. With this option, the application uses system global colors. This works fine for most applications under X11, but on the Windows platform, it may cause dithering of non-standard colors.
  • QApplication::CustomColor. Use this option if your application needs a small number of custom colors. On X11, this option is the same as NormalColor. On Windows, Qt creates a Windows palette, and allocates colors to it on demand.
  • QApplication::ManyColor. Use this option if your application is very color hungry, e.g., it requires thousands of colors.
    Under X11 the effect is:
    • For 256-color displays which have at best a 256 color true color visual, the default visual is used, and colors are allocated from a color cube. The color cube is the 6x6x6 (216 color) "Web palette" (the red, green, and blue components always have one of the following values: 0x00, 0x33, 0x66, 0x99, 0xCC, or 0xFF), but the number of colors can be changed by the -ncols option. The user can force the application to use the true color visual with the -visual option.
    • For 256-color displays which have a true color visual with more than 256 colors, use that visual. Silicon Graphics X servers this feature, for example. They provide an 8 bit visual by default but can deliver true color when asked.

    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.

Example:

int main(int argc, char *argv[])
{
    QApplication::setColorSpec(QApplication::ManyColor);
    QApplication app(argc, argv);
    ...
    return app.exec();
}

See also colorSpec().

[static] void QApplication::setGraphicsSystem(const QString &)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This call has no effect.

Use the QPA framework instead.

[static] void QApplication::setKeypadNavigationEnabled(bool enable)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

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.

Note: On Windows CE this feature is disabled by default for touch device mkspecs. To enable keypad navigation, build Qt with QT_KEYPAD_NAVIGATION defined.

See also keypadNavigationEnabled() and setNavigationMode().

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.