QMenuBar Class Reference |
String matches | Placement | Notes |
---|---|---|
about.* | Application Menu | About <application name> | If this entry is not found no About item will appear in the Application Menu |
config, options, setup, settings or preferences | Application Menu | Preferences | If this entry is not found the Settings item will be disabled |
quit or exit | Application Menu | Quit <application name> | If this entry is not found a default Quit item will be created to call QApplication::quit() |
The Menus example shows how to use QMenuBar and QMenu.
{fowler}{GUI Design Handbook: Menu Bar}
See also QMenu, QShortcut, QAction, and Introduction to Apple Human Interface Guidelines.
This property holds the popup orientation.
The default popup orientation. By default, menus pop "down" the screen. By setting the property to true, the menu will pop "up". You might call this for menus that are below the document to which they refer.
If the menu would not fit on the screen, the other direction is used automatically.
Access functions:
Constructs a menu bar with parent parent.
Destroys the menu bar.
Returns the QAction that is currently highlighted. A null pointer will be returned if no action is currently selected.
See also setActiveAction().
This convenience function creates a new action with text. The function adds the newly created action to the menu's list of actions, and returns it.
See also QWidget::addAction().
This is an overloaded member function, provided for convenience.
This convenience function creates a new action with the given text. The action's triggered() signal is connected to the receiver's member slot. The function adds the newly created action to the menu's list of actions and returns it.
See also QWidget::addAction().
Appends menu to the menubar. Returns the menu's menuAction().
See also QWidget::addAction() and QMenu::menuAction().
This is an overloaded member function, provided for convenience.
Appends a new QMenu with title to the menubar. The menubar takes ownership of the menu. Returns the new menu.
See also QWidget::addAction() and QMenu::menuAction().
This is an overloaded member function, provided for convenience.
Appends a new QMenu with icon and title to the menubar. The menubar takes ownership of the menu. Returns the new menu.
See also QWidget::addAction() and QMenu::menuAction().
Appends a separator to the menu.
Removes all the actions from the menu bar.
See also removeAction().
This signal is emitted when a menu action is highlighted; action is the action that caused the event to be sent.
Often this is used to update status information.
See also triggered() and QAction::hovered().
This convenience function inserts menu before action before and returns the menus menuAction().
See also QWidget::insertAction() and addMenu().
Sets the currently highlighted action to act.
This function was introduced in Qt 4.1.
See also activeAction().
This signal is emitted when a menu action is selected; action is the action that caused the event to be sent.
Normally, you connect each menu action to a single slot using QAction::triggered(), but sometimes you will want to connect several items to a single slot (most often if the user selects from an array). This signal is useful in such cases.
See also hovered() and QAction::triggered().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com