ActionToolBar QML Type

A toolbar built from a list of actions. More...

Import Statement: import org.kde.kirigami
Inherits:

Control

Properties

Detailed Description

Creates a toolbar out of a list of actions. Each item is a QtQuick.Controls.ToolButton by default, but this can be overridden by setting the Action.displayComponent property on that item's Action.

The default behavior of ActionToolBar is to display as many items as possible, placing the ones that don't fit into an overflow menu. You can control this behavior by setting the displayHint property on an item's Action. For example, when setting the DisplayHint.KeepVisible display hint, ActionToolBar will try to keep that action's item in view as long as possible, transforming it into an icon-only button if a button with an icon and text doesn't fit.

Property Documentation

actions : Action [read-only]

This property holds a list of visible actions.

The ActionToolBar will try to display as many actions as possible. The ones that don't fit will go into an overflow menu.


alignment : Qt::Alignment

This property holds the alignment of the buttons.

When there is more space available than required by the visible delegates, we need to determine how to place the delegates.

When there is more space available than required by the visible action delegates, we need to determine where to position them.

default: Qt.AlignLeft

See also Qt::AlignmentFlag.


display : int

This property determines how the icon and text are displayed within the button.

Permitted values are:

  • Button.IconOnly
  • Button.TextOnly
  • Button.TextBesideIcon
  • Button.TextUnderIcon

default: Controls.Button.TextBesideIcon

See also AbstractButton.


flat : bool

This property holds whether the buttons will have a flat/ToolButton style appearance.

default: true


heightMode : enumeration

This property determines how to handle items that do not match the ActionToolBar's height.

Permitted values are:

  • HeightMode.AlwaysCenter
  • HeightMode.AlwaysFill
  • HeightMode.ConstrainIfLarger

default: HeightMode::ConstrainIfLarger


maximumContentWidth : int [read-only]

This property holds the maximum width of the content.

If the ActionToolBar's width is larger than this value, empty space will be added on the sides, according to the Alignment property.

The value of this property is derived from the ActionToolBar's actions and their properties.


overflowIconName : string

This property holds the name of the icon to use for the overflow menu button.

default: overflow-menu


position : int

This property holds the position of the toolbar.

If this ActionToolBar is the contentItem of a QQC2 Toolbar, the position is automatically bound to the ToolBar's position.

Permitted values are:

  • ToolBar.Header: The toolbar is at the top, as a window or page header.
  • ToolBar.Footer: The toolbar is at the bottom, as a window or page footer.

default: QQC2.ToolBar.Header


visibleWidth : int [read-only]

This property holds the combined width of all visible delegates.