From fdb03afb4d86c5d7eef5b537058ab461581c6753 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sat, 7 Apr 2018 03:01:23 +0200 Subject: [PATCH] Send an SMS when the text field is accepted Solves T8339 --- smsapp/qml/ConversationDisplay.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/smsapp/qml/ConversationDisplay.qml b/smsapp/qml/ConversationDisplay.qml index c89959671..1ef2fe356 100644 --- a/smsapp/qml/ConversationDisplay.qml +++ b/smsapp/qml/ConversationDisplay.qml @@ -54,13 +54,16 @@ Kirigami.ScrollablePage id: message Layout.fillWidth: true placeholderText: i18n("Say hi...") - } - Button { - text: "Send" - onClicked: { + onAccepted: { console.log("sending sms", page.phoneNumber) page.telephony.sendSms(page.phoneNumber, message.text) } } + Button { + text: "Send" + onClicked: { + message.accepted() + } + } } }