Element Reference

This document describes the various elements that Union knows about and their properties. Note that this page is based upon what the QtQuick output provides, as that is at time of writing the most complete output.

Element Overview

Things that can be styled by Union are generally referred to as elements. Each element consists of a number of properties that allow style rules to target elements matching those properties. The matching style rules result in a set of properties that should be applied to the matching elements.

An element can have children and each child can have its own children. Indirect children are referred to as descendants. Certain elements have specific children that are considered part of the element, even though they have their own properties. These are referred to as sub-elements.

Each element can have the following properties:

Type

A string indicating the type of element.

ID

A string used as a unique identifier for a single element.

States

States represent different states the element can be in. Many of these are related to input. The following states are currently supported:

Hovered

Set whenever the element is hovered by a mouse or similar input device.

ActiveFocus

Set whenever the element will receive keyboard input when input.

VisualFocus

Set if ActiveFocus is set and the element should visualize that focus.

Pressed

Set whenever the element is being tapped or clicked.

Checked

Set whenever the element is considered to be "on".

Highlighted

Set whenever the element should receive extra visual highlighting.

Hints

Hints are used as extra boolean flags that indicate something is different about the element.

Attributes

Attributes are key-value pairs that indicate something is different about the element, which is more complex than a simple binary state.

Button-like Elements

Button

A Button.

TypeButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the button has an icon set.
flatSet whenever the button should use a flat appearance.
with-menuSet whenever the button has a menu attached to it.
changedSet whenever the button should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

An extra icon that indicates something about the button. By default used to add a down-arrow icon when with-menu is set.

TypeIndicator

ToolButton

A button with a less prominent visual appearance for use in toolbars and similar locations.

TypeToolButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
HintsraisedSet whenever the button should use a raised appearance.
with-menuSet whenever the button has a menu attached to it.
changedSet whenever the button should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

An extra icon that indicates something about the button. By default used to add a down-arrow icon when with-menu is set.

TypeIndicator

ComboBox

A button with a dropdown that allows selecting one of several options.

TypeComboBox
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
Highlighted
HintsflatSet whenever the combobox should use a flat appearance.
editableSet whenever the combobox is user-editable and should display that.
changedSet whenever the combobox should visualize a changed state.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

An icon used to indicate that this is a combobox. Should use a down arrow icon or similar.

TypeIndicator

The dropdown displayed by the combobox.

Note: This subelement is not a descendant of the combobox, so you cannot target it with child or descrendant selectors. Instead, use the type and "combobox" hint to target the popup.

TypePopup
HintscomboboxUsed to indicate that this is a combobox popup.
Delegate

The combobox has a delegate that is used by the dropdown. By default this delegate will be an ItemDelegate but it may be overridden by applications.

RoundButton

A button that is usually displayed in a circular manner.

TypeRoundButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
HintsflatSet whenever the button should use a flat appearance.
changedSet whenever the button should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

DelayButton

A button with progress that will set the checked state after holding it down for a certain amount of time.

TypeDelayButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Hintswith-iconSet whenever the button has an icon set.
with-menuSet whenever the button has a menu attached to it.
changedSet whenever the button should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

An extra icon that indicates something about the button. By default used to add a down-arrow icon when with-menu is set.

TypeIndicator
Fill

A rectangle that indicates how far the DelayButton has progressed.

TypeFill

Text Elements

Label

A simple text label.

TypeLabel
StatesEnabled

TextField

A single-line input field for text.

TypeTextField
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintschangedSet whenever the element should visualize a changed state.

Sub-Elements

Text

The text displayed by the element. Style it using the text related properties.

Placeholder

The text displayed when there is no input. It serves as a hint for what kind of input is accepted. Generally displayed in a muted style.

HintsplaceholderIndicates this is the element's placeholder text.

TextField

A single-line input field for text.

TypeTextField
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintschangedSet whenever the element should visualize a changed state.

Sub-Elements

Text

The text displayed by the element. Style it using the text related properties.

Placeholder

The text displayed when there is no input. It serves as a hint for what kind of input is accepted. Generally displayed in a muted style.

HintsplaceholderIndicates this is the element's placeholder text.

TextArea

A multi-line input field for text.

TypeTextArea
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintschangedSet whenever the element should visualize a changed state.

Sub-Elements

Text

The text displayed by the element. Style it using the text related properties.

Placeholder

The text displayed when there is no input. It serves as a hint for what kind of input is accepted. Generally displayed in a muted style.

HintsplaceholderIndicates this is the element's placeholder text.

SearchField

A single-line input field with a dropdown for searching things.

TypeSearchField
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Text

The text displayed by the element. Style it using the text related properties.

Placeholder

The text displayed when there is no input. It serves as a hint for what kind of input is accepted. Generally displayed in a muted style.

HintsplaceholderIndicates this is the element's placeholder text.
SearchIndicator

An icon that indicates the element is a search field.

TypeSearchIndicator
ClearIndicator

An icon that, when clicked, will clear the element's text.

TypeClearIndicator
Popup

A popup that displays search results for the element.

Note: The popup is not a descendant of the SearchField, so cannot be targeted with descendant selectors. Instead use the type and hint to target the SearchField popup.

TypePopup
HintsSearchFieldIndicates that this is a search field popup.

SpinBox

A text field displaying a numerical value along with increase and decrease buttons.

TypeSpinBox
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintseditableSet when the spinbox allows direct input by the user.
constrainedSet when the spinbox does not have enough space to display the text and buttons with the main layout. This can be used to switch to a more compact layout.
changedSet whenever the element should visualize a changed state.

Sub-Elements

Text

The text displayed by the element. Style it using the text related properties.

Up/Increase Indicator

The button used to increase the value of the spinbox. It consists of a rectangle with an icon centered in it.

TypeIndicator
StatesHovered
Pressed
Enabled
HintsincreaseUsed to indicate this is the up/increase indicator.
Down/Decrease Indicator

The button used to decrease the value of the spinbox. It consists of a rectangle with an icon centered in it.

TypeIndicator
StatesHovered
Pressed
Enabled
HintsdecreaseUsed to indicate this is the down/decrease indicator.

DoubleSpinBox

A SpinBox meant for editing floating-point values. Note that this element is exactly the same as SpinBox, except with one added hint.

HintsdoublespinboxUsed to indicate this is a DoubleSpinBox.

Checkable Elements

CheckBox

A checkable box with a label.

TypeCheckBox
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Hintswith-iconSet whenever the element has an icon set.
changedSet whenever the element should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the element. Style it using the icon related properties.

Text

The text displayed by the element. Style it using the text related properties.

Indicator

A rectangle used to render the checkmark. This should show a checkmark image if the delegate's state is checked.

TypeIndicator

RadioButton

A checkable element that is one of several options.

TypeRadioButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Hintswith-iconSet whenever the element has an icon set.
changedSet whenever the element should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the element. Style it using the icon related properties.

Text

The text displayed by the element. Style it using the text related properties.

Indicator

A rectangle used to render the radio indicator. This should show a radio image if the delegate's state is checked.

TypeIndicator

Switch

A toggle switch with a distinct "on" and "off" state.

TypeSwitch
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled

Sub-Elements

Icon

The icon displayed by the element. Style it using the icon related properties.

Text

The text displayed by the element. Style it using the text related properties.

Indicator

A rectangle used as background for the handle.

TypeIndicator

Sub-Elements

Handle

A rectangle used as moving part of the switch indicator. This will be moved to the appropriate position based on switch state.

TypeHandle

Delegate Elements

ItemDelegate

A standard delegate for lists and other views.

TypeItemDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the delegate has an icon set.
hover-enabledSet when the delegate is supposed to show hover effects.
inside-listSet when the delegate is used inside a list view.
inside-tableSet when the delegate is used inside a table view.
alternating-colorsSet when the delegate should be using alternating row colors.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

CheckDelegate

A standard delegate with a checkmark.

TypeCheckDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the delegate has an icon set.
hover-enabledSet when the delegate is supposed to show hover effects.
inside-listSet when the delegate is used inside a list view.
inside-tableSet when the delegate is used inside a table view.
alternating-colorsSet when the delegate should be using alternating row colors.
changedSet whenever the element should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

A rectangle used to render the checkmark. This should show a checkmark image if the delegate's state is checked.

TypeIndicator

RadioDelegate

A standard delegate with a radio button.

TypeRadioDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the delegate has an icon set.
hover-enabledSet when the delegate is supposed to show hover effects.
inside-listSet when the delegate is used inside a list view.
inside-tableSet when the delegate is used inside a table view.
alternating-colorsSet when the delegate should be using alternating row colors.
changedSet whenever the element should visualize a changed state.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

A rectangle used to render the radio indicator. This should show a radio indicator image if the delegate's state is checked.

TypeIndicator

SwitchDelegate

A standard delegate with a switch.

TypeSwitchDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the delegate has an icon set.
hover-enabledSet when the delegate is supposed to show hover effects.
inside-listSet when the delegate is used inside a list view.
inside-tableSet when the delegate is used inside a table view.
alternating-colorsSet when the delegate should be using alternating row colors.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

A rectangle used as background for the switch handle.

TypeIndicator

Sub-Elements

Handle

A rectangle used as handle of the switch indicator.

TypeHandle

SwipeDelegate

A delegate that can be swiped to the side to reveal content underneath.

TypeSwipeDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
Hintswith-iconSet whenever the delegate has an icon set.
hover-enabledSet when the delegate is supposed to show hover effects.
inside-listSet when the delegate is used inside a list view.
inside-tableSet when the delegate is used inside a table view.
alternating-colorsSet when the delegate should be using alternating row colors.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Progress Indicators and Sliders

BusyIndicator

An element that indicates something is busy.

TypeBusyIndicator

Sub-Elements

Icon

The icon displayed by the indicator. Style it using the icon related properties. The indicator will spin the icon around.

ProgressBar

A bar indicating how far along a process is.

TypeProgressBar
StatesEnabled
HintsindeterminateSet when the progress bar is in an indeterminate (i.e. no progress range is known) state.

Sub-Elements

Track

A rectangle displaying the progress.

TypeTrack

Slider

A button that slides along a track to allow choosing a value.

TypeSlider
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
HintshorizontalSet when the slider is oriented horizontally.
verticalSet when the slider is oriented vertically.
changedSet when the element should display a changed state.

Sub-Elements

Handle

A rectangle that can be dragged to choose the slider value.

TypeHandle
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
Fill

A rectangle displaying the filled part of the slider.

TypeFill
Tick Marks

A slider can have tickmarks to show distinct values. Each tick mark is its own element.

TypeTickMark
HintsactiveSet when the slider value is greater than the value the tick mark represents.

RangeSlider

A slider with two handles that allows selecting a range of values.

TypeRangeSlider
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintshorizontalSet when the slider is oriented horizontally.
verticalSet when the slider is oriented vertically

Sub-Elements

First Handle

A rectangle that can be dragged to choose the minimum value for the range.

TypeHandle
StatesHovered
ActiveFocus
Pressed
Enabled
HintsfirstUsed to indicate this is the first handle.
Second Handle

A rectangle that can be dragged to choose the maximum value for the range.

TypeHandle
StatesHovered
ActiveFocus
Pressed
Enabled
HintssecondUsed to indicate this is the first handle.
Fill

A rectangle displaying the filled part of the slider.

TypeFill

Dial

A circular slider for choosing a value.

TypeDial
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled

Sub-Elements

Handle

A rectangle that can be dragged to choose the dial's value.

TypeHandle
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled

Application Structure

ApplicationWindow

A window element used as the base for applications.

TypeApplicationWindow
HintsinactiveSet when the window does not currently have focus.

Drawer

A pane that slides in from a window edge.

TypeDrawer
HintsmodalSet when the drawer prevents interaction with the rest of the application when it is shown.
AttributesedgeWhich edge of the window the drawer is attached to.
Possible values:
  • left The left edge.
  • right The right edge.
  • top The top edge.
  • bottom The bottom edge.

Frame

A frame that can be used to visually group elements together.

TypeFrame
StatesHovered
ActiveFocus
VisualFocus
Enabled

GroupBox

A box with a title that can be used to visually group elements together.

TypeGroupBox
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

A text element with a background that shows the title.

TypeHeader

Page

A content area with header and footer.

TypePage
StatesHovered
ActiveFocus
VisualFocus
Enabled

Pane

An area with a background that can be used to visually group elements together.

TypePane
StatesHovered
ActiveFocus
VisualFocus
Enabled

ScrollView

An area with a scrollbar for displaying lists and similar scrollable content.

TypeScrollView
StatesHovered
ActiveFocus
VisualFocus
Enabled
Hintshorizontal-scrollSet when the scrollview can scroll horizontally.
vertical-scrollSet when the scrollview can scroll vertically.
framed-backgroundSet when the scrollview should display a frame around itself.

Sub-Elements

Horizontal Scrollbar

The scrollbar used for scrolling horizontally. See the ScrollBar type for details.

Vertical Scrollbar

The scrollbar used for scrolling vertically. See the ScrollBar type for details.

ScrollBar

A bar that indicates the size and position of a scrollable area.

TypeScrollBar
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
HintshorizontalSet when the scrollbar orientation is horizontal.
verticalSet when the scrollbar orientation is vertical.
noninteractiveSet when the scrollbar is used only to display scroll position and cannot be dragged to set the scroll position.

Sub-Elements

Handle

A rectangle used for the draggable part of the scrollbar.

TypeHandle
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled

ScrollIndicator

An indicator that indicates the scroll position of an area. This is generally used to indicate a non-interactive scroll position.

TypeScrollIndicator
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
AttributesorientationUsed to indicate which orientation the scroll indicator has.
Possible values:
  • horizontal The scroll indicator is oriented horizontally.
  • vertical The scroll indicator is oriented vertically.

Sub-Elements

Handle

A rectangle used for the positioned part of the indicator.

TypeHandle
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled

SplitView

An area with a draggable split in the middle that can be used to display two sets of content side by side.

TypeSplitView
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
HintshorizontalSet when the split view is split horizontally.
verticalSet when the split view is split vertically.

Sub-Elements

Handle

The draggable area between two splits.

TypeHandle

StackView

A stack of pages with the top-most page visible.

TypeStackView
StatesHovered
ActiveFocus
VisualFocus
Enabled

SwipeView

A view of multiple elements that allows swiping between those elements.

TypeSwipeView
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintshorizontalSet when the view is oriented horizontally.
verticalSet when the view is oriented vertically.

PageIndicator

An element showing the number of pages and the current page.

TypePageIndicator
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Delegate

A rectangle used for a single page.

TypePageIndicatorDelegate
HintscurrentSet when the delegate displays the current page.

ToolBar

An area used for elements that interact with the rest of the application.

TypeToolBar
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintsheaderSet when the toolbar is located in the header of an application window or page.
footerSet when the toolbar is located in the footer of an application window or page.

ToolSeparator

A line used to separate groups of elements inside a tool bar.

TypeToolSeparator
StatesEnabled
HintshorizontalSet when the separator is oriented horizontally.
verticalSet when the separator is oriented vertically.

TabBar

A row of tab-like buttons that allows switching content.

TypeTabBar
StatesHovered
ActiveFocus
VisualFocus
Enabled
Attributestab-positionThe position of tabs relative to the content.
Possible values:
  • top The tabs are located at the top of content.
  • bottom The tabs are located at the bottom of content.

Sub-Elements

Highlight

A highlight for the current active tab.

TypeTabBarHighlight
StatesEnabled
Highlighted
Hintsitemview-highlightUsed to indicate this is a highlight.
Attributestab-positionThe position of the tab relative to content.
Possible values:
  • top The tab is located at the top of content.
  • bottom The tab is located at the bottom of content.

TabButton

A single button to active a tab.

TypeTabButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Hintswith-iconSet whenever the button has an icon set.
itemview-highlightSet when the tabbar requests highlighting the tab.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.
directionThe position of the tab relative to content.
Possible values:
  • top The tab is located at the top of content.
  • bottom The tab is located at the bottom of content.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Popups and Menus

Popup

A generic popup that can overlay content over the main application content.

TypePopup
StatesActiveFocus
Enabled

Overlay

The overlay underneath popups.

TypeOverlay
HintsmodalUsed to indicate the overlay is for modal popups.
modelessUsed to indicate the overlay is for modeless popups.

Dialog

A popup with a title, content and action buttons.

TypeDialog

Sub-Elements

Header

The label used for the title in the dialog's header.

TypeLabel
HintsheaderUsed to indicate this label is used as a header.

DialogButtonBox

A container for dialog action buttons.

TypeDialogButtonBox
AttributespositionThe position of the dialog button box.
Possible values:
  • header The dialog button box is in the header of a dialog.
  • footer The dialog button box is in the footer of a dialog.

Sub-Elements

Delegate

A button that is used to represent each dialog action.

TypeButton
AttributesroleThe dialog button box role associated with this button.
Possible values:
  • invalid The button has an invalid role.
  • accept The button is used to accept the dialog.
  • reject The button is used to reject the dialog.
  • destructive The button is used for a destructive action.
  • action The button is used for a generic action.
  • help The button is used to call up some form of help.
  • yes The button is used to confirm the dialog.
  • no The button is used to deny the dialog.
  • reset The button is used to reset the contents of the dialog.
  • apply The button is used to apply the changes made in the dialog.

A popup containing a list of interactive elements.

TypeMenu
StatesActiveFocus
Enabled

Sub-Elements

Delegate

The default element for menu items is MenuItem. See there for details.

A single entry in a menu.

TypeMenuItem
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted
HintsexclusiveSet when the menu item is checkable and only a single entry between multiple menu items can be checked. Generally used to change the indicator into a radio button style.
with-submenuSet when the menu item will show a submenu on hover or click.

Sub-Elements

Icon

The icon displayed by the element. Style it using the icon related properties.

Text

The text displayed by the element. Style it using the text related properties.

ShortcutText

A text that shows what shortcut is assigned to the menu item.

TypeShortcutText
Indicator

A rectangle used to display the checkmark for checkable items.

TypeIndicator
Arrow

An icon used to display an arrow icon when the menu item will show a sub menu.

TypeArrow

A separator between different menu items.

TypeMenuSeparator
StatesEnabled

A bar containing items that will show menus.

TypeMenuBar

Sub-Elements

Delegate

The default item used for entries of a menu bar is MenuBarItem.

An item inside a menu bar that will show a menu when clicked.

TypeMenuBarItem
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted

ToolTip

A popup that shows more descriptive text for an element.

TypeToolTip
StatesActiveFocus
Enabled

Table and Tree View

TableViewDelegate

A standard delegate for table views.

TypeTableViewDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
Highlighted
Hintsalternating-colorsSet when the delegate should be using alternating row colors.
editingSet when the user is currently editing the table cell.
currentSet when the table cell is the currently selected cell.
selectedSet when the table cell is in the selected set of cells.

Sub-Elements

Text

The text displayed by the button. Style it using the text related properties.

EditDelegate

A text field that is used when the user is editing the table cell.

TreeViewDelegate

A standard delegate for tree views.

TypeTreeViewDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
Highlighted
Hintsalternating-colorsSet when the delegate should be using alternating row colors.
expandedSet when the children of the tree node are visible.
editingSet when the user is currently editing the table cell.
currentSet when the tree cell is the currently selected cell.
selectedSet when the tree cell is in the selected set of cells.

Sub-Elements

Icon

The icon displayed by the element. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indentation

A transparent item used to reserve space for tree indentation. This should be placed at the start of the delegate.

TypeIndentation
Indicator

An icon used to indicate the tree node has children. Usually styled as an arrow.

TypeIndicator
EditDelegate

A text field that is used when the user is editing the tree cell.

Table and Tree Views

Header View

A horizontal or vertical view of table headers.

TypeHeaderView
StatesActiveFocus
Enabled
HintshorizontalSet when the header view is oriented horizontally.
verticalSet when the header view is oriented vertically.

Sub-Elements

Delegate

An element used to show a single entry of the view.

TypeHeaderViewDelegate
StatesActiveFocus
Enabled
HintshorizontalSet when the delegate is used for a horizontally oriented header view.
verticalSet when the delegate is used for a vertically oriented header view.
sort-ascendingSet when the delegate should indicate ascending sorting is active for the associated table or tree column.
sort-descendingSet when the delegate should indicate descending sorting is active for the associated table or tree column.

Sub-Elements

Icon

An icon that can be used to display sorting state.

Text

A text element that shows the row or column's title.

HeaderViewDelegate

A standard delegate that can be used in a header view.

Note: This is separate from the HeaderView delegate because of Qt versioning reasons.

TypeHeaderViewDelegate
StatesHovered
ActiveFocus
VisualFocus
Pressed
Enabled
Highlighted
HintshorizontalSet when the delegate is intended for a horizontal header.
verticalSet when the delegate is intended for a vertical header.

Sub-Elements

Text

The text that should be displayed.

SelectionRectangle

A rectangle that is used to indicate which cells of a table or tree view are selected.

TypeSelectionRectangle
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Handle

A handle that can be dragged to change the selection.

Note: This is not a descendant of SelectionRectangle so you cannot target it with descendant selectors.

TypeSelectionRectangleHandle
StatesEnabled
VisualFocus

Calendar

MonthGrid

A grid displaying days of a month.

TypeMonthGrid
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Day

A label showing a specific day.

TypeLabel
StatesActiveFocus
Enabled
Hintscurrent-monthSet when the label shows a day of the currently selected month.
todaySet when the label show the current day.

DayOfWeekRow

A row displaying the names of days of the week.

TypeDayOfWeekRow
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Label

A label showing a single day name.

WeekNumberColumn

A column displaying the number of a week.

TypeWeekNumberColumn
StatesHovered
ActiveFocus
VisualFocus
Enabled

Sub-Elements

Label

A label showing a single week number.

Kirigami

Application Header

Base type for Kirigami's application headers.

TypeApplicationHeader
Hintswith-separatorSet when the header should show a separator below it.

Card

An element grouping together information in a view.

TypeCard
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
Highlighted

Chip

A small element used to show tags or similar information.

TypeChip
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
HintsclosableSet when the chip should show a button to remove it.
interactiveSet when the chip can be interacted with.
AttributesdisplayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the chip. Style it using the icon related properties.

Text

The text displayed by the chip. Style it using the text related properties.

Indicator

A toolbutton used for removing or other actions on the chip.

TypeToolButton
HintsindicatorUsed to indicate this is an indicator toolbutton.

Heading

A text element that is used as a title for a different section of content.

TypeHeading
Hintslevel-{1-6}The level of the heading. Lower levels mean bigger headings.
primarySet when the heading should be shown emphasized as a primary heading.
secondarySet when the heading should be shown deemphasized as a secondary heading.

InlineMessage

A text with a distinct background used to display messages to the user.

TypeInlineMessage
AttributestypeThe type of message.
Possible values:
  • positive The message shows something succeeded or similarly positive.
  • warning The message gives a warning that something is wrong.
  • error The message shows an error.
positionWhere the message is located relative to content.
Possible values:
  • inline The message is shown inline with the content.
  • header The message is shown as a header on top of the content.
  • footer The message is shown as a footer below the content.

A tab bar used for navigating between different pages of an application.

TypeNavigationTabBar
StatesHovered
ActiveFocus
VisualFocus
Enabled
HintsheaderSet when the tab bar is located in the header of the application.
footerSet when the tab bar is located in the footer of the application.

A button for use in a NavigationTabBar.

TypeNavigationTabButton
StatesHovered
ActiveFocus
VisualFocus
Pressed
Checked
Enabled
AttributesdirectionWhere the tab button is located relative to the content.
Possible values:
  • top The button is above the content.
  • bottom The button is below the content.
displayA hint indicating what sub-controls should be visible.
Possible values:
  • icon-only Only display the icon.
  • text-only Only display the text.
  • text-beside-icon Display both icon and text in a row.
  • text-below-icon Display both icon and text with the text below the icon.

Sub-Elements

Icon

The icon displayed by the button. Style it using the icon related properties.

Text

The text displayed by the button. Style it using the text related properties.

Indicator

An extra icon that indicates something about the button.

TypeIndicator

OverlayDrawer

A drawer used as base for several Kirigami drawers.

TypeOverlayDrawer
HintsmodalSet when the drawer should block interaction with the application when visible.
AttributesedgeWhich edge of the window the drawer is attached to.
Possible values:
  • left The left edge.
  • right The right edge.
  • top The top edge.
  • bottom The bottom edge.