![]() |
Home · Overviews · Examples |
Qt provides a few low-level global functions for fine-tuning applications. Most of these perform very specific tasks and are platform-specific. In general, we recommend that you try using Qt's public API before resorting to using any functions mentioned here.
These functions are exported by QtCore and QtGui, but most of them aren't declared in Qt's header files. To use them in your application, you must declare them before calling them. For example:
#ifdef Q_WS_X11 void qt_x11_wait_for_window_manager(QWidget *widget); #endif int main(int argc, char *argv[]) { QApplication app(argc, argv); ... window.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&window); #endif ... return app.exec(); }These functions will remain as part of Qt for the lifetime of Qt 4.
Functions:
In Qt 4.4, this is equivalent to QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus);.void qt_mac_set_menubar_merge(bool enable)
enable Specifies whether Qt should attempt to relocate standard menu items (such as Quit, Preferences, and About) to the application menu on Mac OS X. This feature is on by default. See Qt/Mac-Specific Issues for the list of menu items for which this applies.void qt_mac_set_native_menubar(bool enable)
enable Specifies whether the application should use the native menu bar on Mac OS X or be part of the main window. This feature is on by default.void qt_mac_set_dock_menu(QMenu *menu)
menu Sets this menu as the menu to be shown when a press and hold is attempted on your application's dock icon. The menu will be turned into a Mac menu which will be merged with Mac OS X builtin commands.void qt_mac_set_press_and_hold_context(bool enable)
enable Turns emulation of the right mouse button by clicking and holding the left mouse button on or off. This feature is off by default.
Copyright © 2008 Trolltech
Trademarks