Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
settings.qml
import QtQuick 1.0
import org.hildon.components 1.0
import org.hildon.settings 1.0
Dialog {
id: dialog
title: qsTr("Settings Example")
height: column.height + platformStyle.paddingMedium
id: settings
property int number
property string text
fileName: "/home/user/.config/QtComponentsHildon/SettingsExample.conf"
}
Column {
id: column
anchors {
left: parent.left
right: button.left
bottom: parent.bottom
}
width: parent.width
text: qsTr("Text")
}
id: textField
width: parent.width
text: settings.text
}
id: numberButton
width: parent.width
text: qsTr("Number")
pickSelector: ListPickSelector {
id: numberSelector
model: 10
currentIndex: settings.number
}
}
}
id: button
anchors {
right: parent.right
bottom: parent.bottom
}
text: qsTr("Done")
onClicked: dialog.accept()
}
onAccepted: {
settings.text = textField.text;
settings.number = numberSelector.currentIndex;
}
Component.onCompleted: open()
}