Skip to content

PythonQt.QtGui.QToolBar · declarations 001

Back to PythonQt.QtGui.QToolBar

actionAt

actionAt(x: Any, y: Any) -> Any

X.actionAt(x, y) -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::actionAt(const QPoint \&p) const

Returns the action at point p. This function returns zero if no action was found.

See also QWidget::childAt().

QAction *QToolBar::actionAt(int x, int y) const

This is an overloaded function.

Returns the action at the point x, y. This function returns zero if no action was found.

Upstream PySide2 reference signatures (binding differences may apply):

actionAt(self, p: PySide2.QtCore.QPoint) -> PySide2.QtWidgets.QAction
actionAt(self, x: int, y: int) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#actionAt

actionEvent

actionEvent(event: Any) -> None

X.actionEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QToolBar::actionEvent(QActionEvent *event)

Reimplements: QWidget::actionEvent(QActionEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

actionEvent(self, event: PySide2.QtGui.QActionEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#actionEvent

actionGeometry

actionGeometry(action: Any) -> Any

X.actionGeometry(action) -> PythonQt.QtCore.QRect

Upstream PySide2 reference signatures (binding differences may apply):

actionGeometry(self, action: PySide2.QtWidgets.QAction) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#actionGeometry

actionTriggered

actionTriggered(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.actionTriggered; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::actionTriggered(QAction *action)

This signal is emitted when an action in this toolbar is triggered. This happens when the action's tool button is pressed, or when the action is triggered in some other way outside the toolbar. The parameter holds the triggered action.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#actionTriggered

addAction

addAction(icon: Any, text: Any, receiver: Any, member: Any) -> Any

X.addAction(icon, text, receiver, member) -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::addAction(const QString \&text)

Creates a new action with the given text. This action is added to the end of the toolbar.

QAction *QToolBar::addAction(const QIcon \&icon, const QString \&text)

This is an overloaded function.

Creates a new action with the given icon and text. This action is added to the end of the toolbar.

QAction *QToolBar::addAction(const QString \&text, const QObject *receiver, const char *member)

This is an overloaded function.

Creates a new action with the given text. This action is added to the end of the toolbar. The action's triggered() signal is connected to member in receiver.

QAction *QToolBar::addAction(const QIcon \&icon, const QString \&text, const QObject *receiver, const char *member)

This is an overloaded function.

Creates a new action with the given icon and text. This action is added to the end of the toolbar. The action's triggered() signal is connected to member in receiver.

template \<typename Functor> QAction *QToolBar::addAction(const QString \&text, Functor functor)

This is an overloaded function.

Creates a new action with the given text. This action is added to the end of the toolbar. The action's triggered() signal is connected to the functor.

This function was introduced in Qt 5.6.

template \<typename Functor> QAction *QToolBar::addAction(const QString \&text, const QObject *context, Functor functor)

This is an overloaded function.

Creates a new action with the given text. This action is added to the end of the toolbar. The action's triggered() signal is connected to the functor. The functor can be a pointer to a member function in the context object.

If the context object is destroyed, the functor will not be called.

This function was introduced in Qt 5.6.

template \<typename Functor> QAction *QToolBar::addAction(const QIcon \&icon, const QString \&text, Functor functor)

This is an overloaded function.

Creates a new action with the given icon and text. This action is added to the end of the toolbar. The action's triggered() signal is connected to the functor.

This function was introduced in Qt 5.6.

template \<typename Functor> QAction *QToolBar::addAction(const QIcon \&icon, const QString \&text, const QObject *context, Functor functor)

This is an overloaded function.

Creates a new action with the given icon and text. This action is added to the end of the toolbar. The action's triggered() signal is connected to the functor. The functor can be a pointer to a member function of the context object.

If the context object is destroyed, the functor will not be called.

This function was introduced in Qt 5.6.

Upstream PySide2 reference signatures (binding differences may apply):

addAction(self, arg__1: PySide2.QtWidgets.QAction) -> None
addAction(self, icon: PySide2.QtGui.QIcon, text: str) -> PySide2.QtWidgets.QAction
addAction(self, icon: PySide2.QtGui.QIcon, text: str, receiver: PySide2.QtCore.QObject, member: str) -> PySide2.QtWidgets.QAction
addAction(self, text: str) -> PySide2.QtWidgets.QAction
addAction(self, text: str, receiver: PySide2.QtCore.QObject, member: str) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#addAction

addSeparator

addSeparator() -> Any

X.addSeparator() -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::addSeparator()

Adds a separator to the end of the toolbar.

See also insertSeparator().

Upstream PySide2 reference signatures (binding differences may apply):

addSeparator(self) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#addSeparator

addWidget

addWidget(widget: Any) -> Any

X.addWidget(widget) -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::addWidget(QWidget *widget)

Adds the given widget to the toolbar as the toolbar's last item.

The toolbar takes ownership of widget.

If you add a QToolButton with this method, the toolbar's Qt::ToolButtonStyle will not be respected.

Note: You should use QAction::setVisible() to change the visibility of the widget. Using QWidget::setVisible(), QWidget::show() and QWidget::hide() does not work.

See also insertWidget().

Upstream PySide2 reference signatures (binding differences may apply):

addWidget(self, widget: PySide2.QtWidgets.QWidget) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#addWidget

allowedAreas instance-attribute

allowedAreas: Any

Qt 5 reference:

allowedAreas : Qt::ToolBarAreas

areas where the toolbar may be placed

The default is Qt::AllToolBarAreas.

This property only makes sense if the toolbar is in a QMainWindow.

Access functions:

Qt::ToolBarAreas allowedAreas() const
void setAllowedAreas(Qt::ToolBarAreas areas)

Notifier signal:

void allowedAreasChanged(Qt::ToolBarAreas allowedAreas)

See also movable.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#allowedAreas

allowedAreasChanged

allowedAreasChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.allowedAreasChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::allowedAreasChanged(Qt::ToolBarAreas allowedAreas)

This signal is emitted when the collection of allowed areas for the toolbar is changed. The new areas in which the toolbar can be positioned are specified by allowedAreas.

Note: Notifier signal for property allowedAreas.

See also allowedAreas.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#allowedAreasChanged

changeEvent

changeEvent(event: Any) -> None

X.changeEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QToolBar::changeEvent(QEvent *event)

Reimplements: QWidget::changeEvent(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

changeEvent(self, event: PySide2.QtCore.QEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#changeEvent

clear

clear() -> None

X.clear()

Supplemental documentation: Qt 5 reference:

void QToolBar::clear()

Removes all actions from the toolbar.

See also removeAction().

Upstream PySide2 reference signatures (binding differences may apply):

clear(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#clear

customContextMenuRequested

customContextMenuRequested(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.customContextMenuRequested; argument details are not documented.

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.destroyed; argument details are not documented.

event

event(event: Any) -> bool

X.event(event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QToolBar::event(QEvent *event)

Reimplements: QWidget::event(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

event(self, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#event

floatable instance-attribute

floatable: Any

Qt 5 reference:

floatable : bool

This property holds whether the toolbar can be dragged and dropped as an independent window.

The default is true.

Access functions:

bool isFloatable() const
void setFloatable(bool floatable)

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#floatable

floating instance-attribute

floating: Any

Qt 5 reference:

floating : const bool

This property holds whether the toolbar is an independent window.

By default, this property is true.

Access functions:

bool isFloating() const

See also QWidget::isWindow().

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#floating

iconSize instance-attribute

iconSize: QSize

Qt 5 reference:

iconSize : QSize

size of icons in the toolbar.

The default size is determined by the application's style and is derived from the QStyle::PM_ToolBarIconSize pixel metric. It is the maximum size an icon can have. Icons of smaller size will not be scaled up.

Access functions:

QSize iconSize() const
void setIconSize(const QSize \&iconSize)

Notifier signal:

void iconSizeChanged(const QSize \&iconSize)

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#iconSize

iconSizeChanged

iconSizeChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.iconSizeChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::iconSizeChanged(const QSize \&iconSize)

This signal is emitted when the icon size is changed. The iconSize parameter holds the toolbar's new icon size.

Note: Notifier signal for property iconSize.

See also iconSize and QMainWindow::iconSize.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#iconSizeChanged

initStyleOption

initStyleOption(option: Any) -> None

X.initStyleOption(option)

Upstream PySide2 reference signatures (binding differences may apply):

initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionToolBar) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#initStyleOption

insertSeparator

insertSeparator(before: Any) -> Any

X.insertSeparator(before) -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::insertSeparator(QAction *before)

Inserts a separator into the toolbar in front of the toolbar item associated with the before action.

See also addSeparator().

Upstream PySide2 reference signatures (binding differences may apply):

insertSeparator(self, before: PySide2.QtWidgets.QAction) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#insertSeparator

insertWidget

insertWidget(before: Any, widget: Any) -> Any

X.insertWidget(before, widget) -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::insertWidget(QAction *before, QWidget *widget)

Inserts the given widget in front of the toolbar item associated with the before action.

Note: You should use QAction::setVisible() to change the visibility of the widget. Using QWidget::setVisible(), QWidget::show() and QWidget::hide() does not work.

See also addWidget().

Upstream PySide2 reference signatures (binding differences may apply):

insertWidget(self, before: PySide2.QtWidgets.QAction, widget: PySide2.QtWidgets.QWidget) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#insertWidget

isAreaAllowed

isAreaAllowed(area: Any) -> bool

X.isAreaAllowed(area) -> bool

Supplemental documentation: Qt 5 reference:

bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const

Returns true if this toolbar is dockable in the given area; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isAreaAllowed(self, area: PySide2.QtCore.Qt.ToolBarArea) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#isAreaAllowed

isFloatable

isFloatable() -> bool

X.isFloatable() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isFloatable(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#isFloatable

isFloating

isFloating() -> bool

X.isFloating() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isFloating(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#isFloating

isMovable

isMovable() -> bool

X.isMovable() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isMovable(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#isMovable

movable instance-attribute

movable: Any

Qt 5 reference:

movable : bool

This property holds whether the user can move the toolbar within the toolbar area, or between toolbar areas.

By default, this property is true.

This property only makes sense if the toolbar is in a QMainWindow.

Access functions:

bool isMovable() const
void setMovable(bool movable)

Notifier signal:

void movableChanged(bool movable)

See also allowedAreas.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#movable

movableChanged

movableChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.movableChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::movableChanged(bool movable)

This signal is emitted when the toolbar becomes movable or fixed. If the toolbar can be moved, movable is true; otherwise it is false.

Note: Notifier signal for property movable.

See also movable.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#movableChanged

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.objectNameChanged; argument details are not documented.

orientation instance-attribute

orientation: Any

Qt 5 reference:

orientation : Qt::Orientation

orientation of the toolbar

The default is Qt::Horizontal.

This function should not be used when the toolbar is managed by QMainWindow. You can use QMainWindow::addToolBar() or QMainWindow::insertToolBar() if you wish to move a toolbar that is already added to a main window to another Qt::ToolBarArea.

Access functions:

Qt::Orientation orientation() const
void setOrientation(Qt::Orientation orientation)

Notifier signal:

void orientationChanged(Qt::Orientation orientation)

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#orientation

orientationChanged

orientationChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.orientationChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::orientationChanged(Qt::Orientation orientation)

This signal is emitted when the orientation of the toolbar changes. The orientation parameter holds the toolbar's new orientation.

Note: Notifier signal for property orientation.

See also orientation.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#orientationChanged

paintEvent

paintEvent(event: Any) -> None

X.paintEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QToolBar::paintEvent(QPaintEvent *event)

Reimplements: QWidget::paintEvent(QPaintEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

paintEvent(self, event: PySide2.QtGui.QPaintEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#paintEvent

setAllowedAreas

setAllowedAreas(areas: Any) -> None

X.setAllowedAreas(areas)

Upstream PySide2 reference signatures (binding differences may apply):

setAllowedAreas(self, areas: PySide2.QtCore.Qt.ToolBarAreas) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setAllowedAreas

setFloatable

setFloatable(arg0: floatable) -> None

X.setFloatable(floatable)

Upstream PySide2 reference signatures (binding differences may apply):

setFloatable(self, floatable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setFloatable

setIconSize

setIconSize(iconSize: Any) -> None

X.setIconSize(iconSize)

Upstream PySide2 reference signatures (binding differences may apply):

setIconSize(self, iconSize: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setIconSize

setMovable

setMovable(movable: bool) -> None

X.setMovable(movable)

Upstream PySide2 reference signatures (binding differences may apply):

setMovable(self, movable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setMovable

setOrientation

setOrientation(orientation: Any) -> None

X.setOrientation(orientation)

Upstream PySide2 reference signatures (binding differences may apply):

setOrientation(self, orientation: PySide2.QtCore.Qt.Orientation) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setOrientation

setToolButtonStyle

setToolButtonStyle(toolButtonStyle: Any) -> None

X.setToolButtonStyle(toolButtonStyle)

Upstream PySide2 reference signatures (binding differences may apply):

setToolButtonStyle(self, toolButtonStyle: PySide2.QtCore.Qt.ToolButtonStyle) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#setToolButtonStyle

toggleViewAction

toggleViewAction() -> Any

X.toggleViewAction() -> PythonQt.QtGui.QAction

Supplemental documentation: Qt 5 reference:

QAction *QToolBar::toggleViewAction() const

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.

Upstream PySide2 reference signatures (binding differences may apply):

toggleViewAction(self) -> PySide2.QtWidgets.QAction

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#toggleViewAction

toolButtonStyle instance-attribute

toolButtonStyle: Any

Qt 5 reference:

toolButtonStyle : Qt::ToolButtonStyle

This property holds the style of toolbar buttons

This property defines the style of all tool buttons that are added as QActions. Note that if you add a QToolButton with the addWidget() method, it will not get this button style.

To have the style of toolbuttons follow the system settings, set this property to Qt::ToolButtonFollowStyle. On Unix, the user settings from the desktop environment will be used. On other platforms, Qt::ToolButtonFollowStyle means icon only.

The default is Qt::ToolButtonIconOnly.

Access functions:

Qt::ToolButtonStyle toolButtonStyle() const
void setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle)

Notifier signal:

void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle)

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#toolButtonStyle

toolButtonStyleChanged

toolButtonStyleChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QToolBar.toolButtonStyleChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QToolBar::toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle)

This signal is emitted when the tool button style is changed. The toolButtonStyle parameter holds the toolbar's new tool button style.

Note: Notifier signal for property toolButtonStyle.

See also toolButtonStyle and QMainWindow::toolButtonStyle.

Source: https://doc.qt.io/archives/qt-5.15/qtoolbar.html#toolButtonStyleChanged