The VToolHeader is a widget used as header bar for tool box.
Inherits: QWidget
Methods
Signals
The VToolHeader is a widget used as header bar for tool box.
The header can have a button expand-collapse with the method setCollapseButton, a subject related icon with setIcon, a title with setTitle and a set of buttons with add_button.
These widgets are placed from left to right but the orientation may be reversed with setOrientation.
![]()
A VToolHeader with a button expand-collapse, an icon, a title and a set of two buttons.
Methods
Instanciate the VToolHeader.
Arguments:
- parent The parent of the header
- icon The icon, may be a QIcon, a QPixmap or an image file path
- title The title str(title)
- orientation QT.LayoutDirection
Add a tool button to the header.
Arguments:
- icon The icon of the button.
- name The name of the button used for the property objectName, if None, the name ‘headerButton_x’ will be used.
Returns the instance of the button.
Returns the number of tool buttons.
Type: int()
Returns the shadow property of the header.
This is a pyqtProperty
Type: QFrame.Shadow
Returns the shape property of the header.
This is a pyqtProperty
Type: QFrame.Shape
Returns the height of the header.
Type: int()
Returns the icon of the header.
This is a pyqtProperty
Type: QIcon()
Returns the orientation of the button’s layout.
This is a pyqtProperty
Type: Qt.LayoutDirection
Returns the title of the header.
This is a pyqtProperty
Type: str() or QString()
Returns the width of the header.
Type: int()
Returns True if the header has a button collapse-expand.
This is a pyqtProperty
Returns True if the widgets are oriented by the locale language.
This is a pyqtProperty
Remove a tool button from the header.
Arguments:
- btn The instance of the button.
Sets the icon wich represent the state collapsed.
This icon is used for the header oriented from left to rigth.
Arguments:
- icon A QIcon or a QPixmap instance or an image file path.
Sets the icon wich represent the state collapsed.
This icon is used for the header oriented from right to left.
Arguments:
- icon A QIcon or a QPixmap instance or an image file path.
Sets the button collapse-expand.
This button is used to show-hide the tool box that have this header.
The icon, by default, is a little black triangle and can be customized.
This property can be defined in the Qt Designer.
Arguments:
- b Boolean.
Raise TypeError if the argument is not boolean.
See: set_expanded_icon, set_collapsed_left_icon, set_collapsed_right_icon and set_expanding_buttons
Sets the icon wich represent the state expanded.
Arguments:
- icon A QIcon or a QPixmap instance or an image file path
Sets the icons used for the button collapse-expand.
Arguments:
- down The icon wich represent the state expanded.
- left The left side icon wich represent the state collapsed.
- right The right side icon wich represent the state collapsed.
Icons may be QIcon or QPixmap instances or image file paths.
Sets the shadow for the header frame.
This property can be defined in the Qt Designer.
Arguments:
- shadow QFrame.Shadow
Sets the shape of the header.
This property can be defined in the Qt Designer.
Arguments:
- shape QFrame.Shape.
Sets the header’s icon.
This property can be defined in the Qt Designer.
Arguments:
- icon A QIcon or QPixmap instance or an image file path
Sets the orientation of the widgets.
This property can be defined in the Qt Designer.
Arguments:
- orientation Qt.LayoutDirection.
Sets the orientation in accordance with the language.
Theses languages are written from right to left:
- Arabic [ar]
- Hebrew [he]
- Persian [fa]
- Urdu [ur]
- Syriac [syr]
This property can be defined in the Qt Designer.
Arguments:
- b Boolean.
Sets a style sheet to the header.
Arguments:
- sheet str()
Sets the title of the header.
This property can be defined in the Qt Designer.
Arguments:
- title str() or QString().
Signals
This signal is sent whenever the user click on the button collapse-expand.
Type:
- bool Boolean, True for expand, False for collapse.
This signal is sent whenever the user click on a button.
Type:
- button QPushButton instance.