Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QToolBar class provides a movable panel that contains a set of controls. More...
#include <QToolBar>
Inherits QWidget.
The QToolBar class provides a movable panel that contains a set of controls.
Toolbar buttons are added by adding actions, using addAction() or insertAction(). Groups of buttons can be separated using addSeparator() or insertSeparator(). If a toolbar button is not appropriate, a widget can be inserted instead using addWidget() or insertWidget(); examples of suitable widgets are QSpinBox, QDoubleSpinBox, and QComboBox. When a toolbar button is pressed it emits the actionTriggered() signal. Toolbars may only be added to QMainWindow and QMainWindow subclasses.
A 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, or it can be floatable: see allowedAreas and isDockable().
This property holds whether the user can move the toolbar within the toolbar area, or between toolbar areas.
By default, this property is true when the toolbar is added to a QMainWindow. This property is always false, and cannot be set to true, when the QToolBar is not added to a QMainWindow.
Access functions:
See also QToolBar::allowedAreas.
Constructs a QToolBar with the given parent.
Destroys the toolbar.
Returns the action at the point x, y. This function returns zero if no action was found.
See also QWidget::childAt().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Returns the action at point p.
This signal is emitted when a toolbar button is pressed. The parameter holds the toolbar button's associated action.
Adds action to the end of the toolbar.
See also addAction().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with text text. This action is added to the end of the toolbar.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the icon icon and text text. This action is added to the end of the toolbar.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with text text. This action is added to the end of the toolbar. The action's triggered() signal is connected to member in receiver.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the icon icon and text text. This action is added to the end of the toolbar. The action's triggered() signal is connected to member in receiver.
Adds a separator to the end of the toolbar.
See also insertSeparator().
Adds the given widget to the toolbar as the toolbar's last item.
See also insertWidget().
areas where the toolbar may be placed.
The default is Qt::AllToolBarAreas.
Removes all actions from the toolbar.
See also removeAction().
size of icons in the toolbar.
The default is Qt::AutomaticIconSize.
Inserts the given action into the toolbar in front of the tool bar item associated with the before action.
See also addAction().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the given text. This action is inserted into the toolbar in front of the toolbar item associated with the before action.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the given icon and text. This action is inserted into the toolbar in front of the toolbar item associated with the before action.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the given text. This action is inserted into the toolbar in front of the toolbar item associated with the before action. The action's triggered() signal is connected to the member in receiver.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Creates a new action with the given icon and text. This action is inserted into the toolbar in front of the toolbar item associated with the before action. The action's triggered() signal is connected to the member in the receiver.
Inserts a separator into the toolbar in front of the toolbar item associated with the before action.
See also addSeparator().
Inserts the given widget in front of the toolbar item associated with the before action.
See also addWidget().
Returns true if this toolbar is dockable in the given area; otherwise returns false.
orientation of the toolbar.
The default is Qt::Horizontal.
Note: the orientation is updated automatically when the toolbar is managed by QMainWindow.
Returns a checkable action that can be used to show or hide this toolbar.
The action's text is set to the toolbar's window title.
See also QAction::text and QWidget::windowTitle.
style of toolbar buttons.
The defaults is Qt::ToolButtonIconOnly.
Copyright © 2004 Trolltech | Trademarks | Qt 4.0.0-b1 |