aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2014-04-16 09:50:16 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2014-04-22 11:21:28 +0200
commit6db907f935313760c402deb9f56fab3a53b6b53c (patch)
tree71e4d87c556ee024a55e3d12c533f6440670e92e /share
parentd01be9da1d03ddddaec8f6e6766dc0a91124a07e (diff)
QmlDesigner.PropertyEditor: Adding tooltip to ButtonRowButton
Change-Id: Ia5117b9831d8ccf8c01774a247bc3c68642bc8e4 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml
index 5fe40b880d..78575d9f43 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml
@@ -30,6 +30,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.0 as Controls
import QtQuick.Layouts 1.0
+import QtQuick.Controls.Private 1.0
Item {
id: buttonRowButton
@@ -41,6 +42,8 @@ Item {
signal clicked()
+ property string tooltip: ""
+
width: 24 + leftPadding
height: 24
@@ -94,6 +97,7 @@ Item {
}
MouseArea {
+ id: mouseArea
anchors.fill: parent
anchors.leftMargin: leftPadding
onClicked: {
@@ -104,5 +108,16 @@ Item {
}
buttonRowButton.clicked()
}
+
+ onExited: Tooltip.hideText()
+ onCanceled: Tooltip.hideText()
+
+ hoverEnabled: true
+
+ Timer {
+ interval: 1000
+ running: mouseArea.containsMouse && tooltip.length
+ onTriggered: Tooltip.showText(mouseArea, Qt.point(mouseArea.mouseX, mouseArea.mouseY), tooltip)
+ }
}
}