Contents

Button

The Button class is DOCME More...

Inherited by TabButton.

Properties

Detailed Description

This component is under heavy development.

Examples:

Column {
    Button {
        text: "Send"
        onClicked: print("clicked text-only Button")
    }
    Button {
        iconSource: "icon.png"
        color: "green"
        onClicked: print("clicked icon-only Button")
    }
    Button {
        iconSource: "icon.png"
        text: "Icon on left"
        iconPosition: "left"
        onClicked: print("clicked text and icon Button")
    }
}

Property Documentation

color : color

This documentation is under development and is subject to change.

The foreground color of the button in idle state.


iconPosition : string

This documentation is under development and is subject to change.

The position of the icon relative to the text. Options are "left" and "right". The default value is "left".

If only text or only an icon is defined, this property is ignored and the text or icon is centered horizontally and vertically in the button.

Currently this is a string value. We are waiting for support for enums: https://bugreports.qt-project.org/browse/QTBUG-14861


iconSource : url

This documentation is under development and is subject to change.

The source URL of the icon to display inside the button. Leave this value blank for a text-only button.


text : string

This documentation is under development and is subject to change.

The text to display in the button. If an icon was defined, the text will be shown next to the icon, otherwise it will be centered. Leave blank for an icon-only button.