void QToolBar:: orientationChanged( Qt::Orientation orientation) Note: Notifier signal for property movable. If the toolbar can be moved, movable is true otherwise it is false. This signal is emitted when the toolbar becomes movable or fixed.
void QToolBar:: movableChanged( bool movable)
See also iconSize and QMainWindow::iconSize. Note: Notifier signal for property iconSize. The iconSize parameter holds the toolbar's new icon size. This signal is emitted when the icon size is changed. void QToolBar:: iconSizeChanged(const QSize & iconSize) Note: Notifier signal for property allowedAreas. The new areas in which the toolbar can be positioned are specified by allowedAreas. This signal is emitted when the collection of allowed areas for the toolbar is changed. void QToolBar:: allowedAreasChanged( Qt::ToolBarAreas allowedAreas) The parameter holds the triggered action. This happens when the action's tool button is pressed, or when the action is triggered in some other way outside the toolbar. This signal is emitted when an action in this toolbar is triggered. void QToolBar:: actionTriggered( QAction * action) The given window title identifies the toolbar and is shown in the context menu provided by QMainWindow. QToolBar:: QToolBar(const QString & title, QWidget * parent = nullptr)Ĭonstructs a QToolBar with the given parent. Member Function Documentation QToolBar:: QToolBar( QWidget * parent = nullptr)Ĭonstructs a QToolBar with the given parent. See also QToolButton, QMenu, QAction, and Application Example. Please use widget actions created by inheriting QWidgetAction and implementing QWidgetAction::createWidget() instead. When a QToolBar is not a child of a QMainWindow, it loses the ability to populate the extension pop up with widgets added to the toolbar using addWidget(). Pressing the extension button will pop up a menu containing the items that do not currently fit in the toolbar. When a toolbar is resized in such a way that it is too small to show all the items it contains, an extension button will appear as the last item in the toolbar. When a toolbar button is pressed, it emits the actionTriggered() signal.Ī toolbar can be fixed in place in a particular area (e.g., at the top of the window), or it can be movable between toolbar areas see setMovable(), isMovable(), allowedAreas() and isAreaAllowed(). Examples of suitable widgets are QSpinBox, QDoubleSpinBox, and QComboBox. If a toolbar button is not appropriate, a widget can be inserted instead using addWidget() or insertWidget(). Groups of buttons can be separated using addSeparator() or insertSeparator(). Toolbar buttons are added by adding actions, using addAction() or insertAction(). SetOrientation(Qt::Orientation orientation) IsAreaAllowed(Qt::ToolBarArea area) const InsertWidget(QAction * before, QWidget * widget) QToolBar(const QString & title, QWidget * parent = nullptr)ĪddAction(const QIcon & icon, const QString & text)ĪddAction(const QString & text, const QObject * receiver, const char * member)ĪddAction(const QIcon & icon, const QString & text, const QObject * receiver, const char * member)ĪddAction(const QString & text, Functor functor)ĪddAction(const QString & text, const QObject * context, Functor functor)ĪddAction(const QIcon & icon, const QString & text, Functor functor)ĪddAction(const QIcon & icon, const QString & text, const QObject * context, Functor functor)