Send an SMS when the text field is accepted

Solves T8339
This commit is contained in:
Aleix Pol 2018-04-07 03:01:23 +02:00
parent c42829a7d6
commit fdb03afb4d

View file

@ -54,13 +54,16 @@ Kirigami.ScrollablePage
id: message id: message
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: i18n("Say hi...") placeholderText: i18n("Say hi...")
} onAccepted: {
Button {
text: "Send"
onClicked: {
console.log("sending sms", page.phoneNumber) console.log("sending sms", page.phoneNumber)
page.telephony.sendSms(page.phoneNumber, message.text) page.telephony.sendSms(page.phoneNumber, message.text)
} }
} }
Button {
text: "Send"
onClicked: {
message.accepted()
}
}
} }
} }