Button QML Type

A simple button component More...

Import Statement: import quey.ui 0.1
Inherits:

Item

Properties

Signals

Detailed Description

import QtQuick 2.4
import quey.ui 0.1

ApplicationView {
    width: Units.dp(640)
    height: Units.dp(480)

    Column {
        anchors.fill: parent
        anchors.margins: Style.spacing
        spacing: Style.spacing

        Button {
            text: "Regular"
            onClicked: {
                console.log("Keep calm - keep coding :)")
            }
        }

        Button {
            text: "Warning"
            color: Style.palette.warning
        }

        Button {
            text: "Success"
            color: Style.palette.success
        }

    }
}

Property Documentation

color : color

The button's color. Defaults to Style.palette.regular.


hovered : bool

This property is true when the mouse pointer hovers the button.


minimumWidth : int

The minimum width of the button. Defaults to 94.


pressed : bool

This property is true when the left mouse button is pressed down over the button.


text : string

The button's text. The button is automatically expanded based on the length of the text. To supress this behaivour assign a value to width.


Signal Documentation

clicked()

This signal gets triggered when the button was clicked.