From d3cb00e75de822aafcb5e0ceba38bda58a7d07fb Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Thu, 29 Apr 2010 09:51:24 +0200
Subject: [PATCH] QmlDesigner.propertyEditor: show expressions as tooltips

Expressions are now shown as a tooltip if an expression is set
---
 share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml | 1 +
 share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml      | 1 +
 share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml       | 1 +
 3 files changed, 3 insertions(+)

diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml
index 2bd89a133b3..575ffd0791d 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml
@@ -80,6 +80,7 @@ QWidget { //This is a special doubleSpinBox that does color coding for states
             decimals: 1;
             keyboardTracking: false;
             enabled: !backendValue.isBound && doubleSpinBox.enabled;
+            toolTip: backendValue.isBound ? backendValue.expression : ""
 
             property bool readingFromBackend: false;
             property real valueFromBackend: doubleSpinBox.backendValue.value;
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml
index bbb98da0b32..e1bb4c72384 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml
@@ -57,6 +57,7 @@ QWidget {
         styleSheet: "QLineEdit { padding-left: 32; }"
         width: lineEdit.width
         height: lineEdit.height
+        toolTip: backendValue.isBound ? backendValue.expression : ""
         
         property string valueFromBackend: (backendValue === undefined || backendValue.value === undefined) ? "" : backendValue.value;
 
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml
index 733008e4856..6ceb50f461d 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml
@@ -65,6 +65,7 @@ QWidget { //This is a special spinBox that does color coding for states
 	    spacing: 4
         QSpinBox {
             property alias backendValue: spinBox.backendValue
+            toolTip: backendValue.isBound ? backendValue.expression : ""
 			
 			enabled: !backendValue.isBound && spinBox.enabled;
 
-- 
GitLab