Skip to content

Button

Button is a button control that users can press or click. Buttons are typically used to perform actions or answer questions.

Like native components in QtQuick, when a button is activated by the user, it emits a clicked() signal. Connecting this signal allows the execution of actions associated with the button. The usage method is consistent with native controls.

A Basic Button

qml
Button {
    text: qsTr("Standard QML Button")
}

Button with Icon

qml
Button {
    icon.source: Qt.resolvedUrl("../../assets/BA_Pic_Shiroko-chibi.png")   
    text: qsTr("Sunaookami Shiroko")
}

Button {
    icon.name: "ic_fluent_button_20_regular"
    text: qsTr("Button with Icon")
}

Highlighted Button

qml
Button {
    highlighted: true
    text: qsTr("Accent Style Button")
}

Flat Button

qml
Button {
    flat: true
    text: qsTr("Plain Style Button")
}

Custom Button (Highlighted)

qml
Button {
    highlighted: true
    primaryColor: "#444"
    text: qsTr("Button with Custom Color")
}

Released under the MIT License.