UI: Use textChanged() signal instead of editingFinished().

To use edited text when clicked on OK immediately.
This commit is contained in:
Nodir Temirkhodjaev 2017-09-11 17:07:43 +05:00
parent ef8c4960c5
commit 8f2a8930df
4 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
Frame { Frame {
id: frame id: frame
signal editingFinished() // Workaround for QTBUG-59908 signal textChanged() // Workaround for QTBUG-59908
readonly property alias textArea: textArea readonly property alias textArea: textArea
@ -16,7 +16,7 @@ Frame {
TextArea { TextArea {
id: textArea id: textArea
clip: true // to clip placeholder text clip: true // to clip placeholder text
onEditingFinished: frame.editingFinished() onTextChanged: frame.textChanged()
} }
} }
} }

View File

@ -46,7 +46,7 @@ ColumnLayout {
text: addressGroup.text text: addressGroup.text
} }
onEditingFinished: { onTextChanged: {
addressGroup.text = textArea.text; addressGroup.text = textArea.text;
setConfEdited(); setConfEdited();

View File

@ -59,7 +59,7 @@ C:\\Program Files\\Internet Explorer\\iexplore.exe
text: appGroup.blockText text: appGroup.blockText
} }
onEditingFinished: { onTextChanged: {
appGroup.blockText = textArea.text; appGroup.blockText = textArea.text;
setConfEdited(); setConfEdited();
@ -80,7 +80,7 @@ C:\\Program Files\\Skype\\Phone\\Skype.exe
text: appGroup.allowText text: appGroup.allowText
} }
onEditingFinished: { onTextChanged: {
appGroup.allowText = textArea.text; appGroup.allowText = textArea.text;
setConfEdited(); setConfEdited();

View File

@ -9,7 +9,7 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
signal editingFinished() // Workaround for QTBUG-59908 signal textChanged() // Workaround for QTBUG-59908
readonly property alias title: title readonly property alias title: title
readonly property alias textArea: textAreaFrame.textArea readonly property alias textArea: textAreaFrame.textArea
@ -25,6 +25,6 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
onEditingFinished: container.editingFinished() onTextChanged: container.textChanged()
} }
} }