1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | I have this Dialog:
Component {
id: addbambino
Dialog {
id:addbambinoDialog
Text {
text: i18n.tr("Nome bambino:")
}
TextField {
id: addName
objectName: "addName"
}
Text {
text: i18n.tr("Peso bambino:")
}
TextField {
id: addWeight
objectName: "addWeight"
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
Button {
color: "green"
text: i18n.tr("Aggiungi questo bambino")
onClicked: {
page1.addNameVar = addName.text
page1.addWeightVar = addWeight.text
PopupUtils.close(addbambinoDialog)
}
}
Button {
text: i18n.tr("Annulla")
onClicked: PopupUtils.close(addbambinoDialog)
}
}
}
and this button inside a BottomEdge
Button {
text: i18n.tr("OK")
width: 0.85*parent.width
x: (parent.width-this.width)/2
y: units.gu(15)
color: "green"
onClicked: {
if (page1.bambinoSelez == 4) {
PopupUtils.open(addbambino)
pers0.text = page1.addNameVar
pers0.text = page1.addWeightVar
}
}
|