StyledItem

The StyledItem class allows items to be styled by the theme. More...

Inherited by ActionItem, Dialer, DialerHand, Header, PageTreeNode, Picker, Scrollbar, Slider, TabBar, and TextArea.

Properties

Detailed Description

StyledItem provides facilities for making an Item stylable by the theme.

In order to make an Item stylable by the theme, it is enough to make the Item inherit from StyledItem and set its style property to be the result of the appropriate call to Theme.createStyleComponent().

Example definition of a custom Item MyItem.qml:

StyledItem {
    id: myItem
    style: Theme.createStyleComponent("MyItemStyle.qml", myItem)
}

The Component set on style is instantiated and placed below everything else that the Item contains.

A reference to the Item being styled is accessible from the style and named 'styledItem'.

See also Theme.

Property Documentation

style : Component

Component instantiated immediately and placed below everything else.