Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
Properties | List of all members
Button Class Reference

A basic push button. More...

Inherits AbstractButton.

Properties

ButtonStyle style
 Provides styling properties for the button.
- Properties inherited from AbstractButton
Action action
 The Action associated with the button.
bool autoRepeat
 Whether the button should accept auto-repeated key events.
bool checkable
 Whether the button is checkable.
bool checked
 Whether the button is checked.
ExclusiveGroup exclusiveGroup
 The ExclusiveGroup to which the button belongs.
string iconName
 The name of the icon to be used.
string iconSource
 The source of the icon to be used.
bool pressed
 Whether the button is pressed.
keysequence shortcut
 The keyboard shorcut used to click the button.
string text
 The text to be displayed in the button.

Additional Inherited Members

- Signals inherited from AbstractButton
void clicked ()
 Emitted when the button is clicked.
void toggled (bool checked)
 Emitted when the button checked property is changed.

Detailed Description

A basic push button.

The Button component provides a basic push button which can be styled to provide the correct appearance depending on the context in which it is used.

import QtQuick 1.0
import org.hildon.components 1.0
Window {
id: window
title: qsTr("Buttons Example")
visible: true
id: flickable
anchors.fill: parent
contentHeight: column.height + platformStyle.paddingMedium
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
Column {
id: column
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
width: 300
Button {
width: parent.width
text: qsTr("Push Button")
onClicked: console.log(qsTr("Button clicked"))
}
Button {
width: parent.width
text: qsTr("Accept Button")
}
Button {
width: parent.width
text: qsTr("Dialog Button")
}
Button {
width: parent.width
text: qsTr("Reject Button")
}
Button {
width: parent.width
text: qsTr("Thumb Button")
}
}
}
}
See Also
ButtonStyle
Examples:
actions.qml, audio.qml, buttons.qml, dbus.qml, directory.qml, file.qml, gconf.qml, notification.qml, process.qml, screenshot.qml, selectors.qml, settings.qml, widget.qml, and window.qml.