summaryrefslogtreecommitdiff
path: root/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
index 11b128b069..cc7fdca50d 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
@@ -28,12 +28,17 @@
****************************************************************************/
-import QtQuick 2.1
+import QtQuick 2.2
import QtQuick.Controls 1.1 as Controls
import QtQuick.Controls.Styles 1.0
Controls.TextField {
+ Controls.Action {
+ //Workaround to avoid that "Delete" deletes the item.
+ shortcut: "Delete"
+ }
+
id: lineEdit
property variant backendValue
property color borderColor: "#222"
@@ -57,7 +62,7 @@ Controls.TextField {
}
}
- onAccepted: {
+ onEditingFinished: {
if (backendValue.value !== text)
backendValue.value = text;
}