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

The base class for buttons. More...

Inherited by Button, CheckBox, ToolButton, and ValueButton.

Signals

void clicked ()
 Emitted when the button is clicked.
void toggled (bool checked)
 Emitted when the button checked property is changed.

Properties

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.

Detailed Description

The base class for buttons.

AbstractButton provides functions, properties and signals common to interactive buttons. It does not draw any content.

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
width: parent.width
text: qsTr("Push Button")
onClicked: console.log(qsTr("Button clicked"))
}
width: parent.width
text: qsTr("Accept Button")
}
width: parent.width
text: qsTr("Dialog Button")
}
width: parent.width
text: qsTr("Reject Button")
}
width: parent.width
style: ThumbButtonStyle {}
text: qsTr("Thumb Button")
}
}
}
}

Property Documentation

Action AbstractButton::action

The Action associated with the button.

The default value is null.

See Also
Action
bool AbstractButton::autoRepeat

Whether the button should accept auto-repeated key events.

The default value is true.

bool AbstractButton::checkable

Whether the button is checkable.

The default value is false.

bool AbstractButton::checked

Whether the button is checked.

The default value is false.

ExclusiveGroup AbstractButton::exclusiveGroup

The ExclusiveGroup to which the button belongs.

The default value is null.

See Also
ExclusiveGroup
string AbstractButton::iconName

The name of the icon to be used.

See Also
iconSource
string AbstractButton::iconSource

The source of the icon to be used.

See Also
iconName
bool AbstractButton::pressed

Whether the button is pressed.

The default value is false.