Theme QML Type

The Theme class provides facilities to interact with the current theme. More...

Import Statement: import Lomiri.Components 1.3



Detailed Description

A global instance is exposed as the Theme context property.

The theme defines the visual aspect of the Lomiri components.

Example changing the current theme:

import QtQuick 2.4
import Lomiri.Components 1.2

Item {
    Button {
        onClicked: = "Lomiri.Components.Themes.Ambiance"

Example creating a style component:

import QtQuick 2.4
import Lomiri.Components 1.2

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

See also StyledItem.

Property Documentation

name : string

The name of the current theme.

palette : Palette

The palette of the current theme.

Method Documentation

Component createStyleComponent(string styleName, object parent)

Returns an instance of the style component named styleName.