From 633eed6bb6bc2251cfb324d8017279bee14578b0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 20 Aug 2017 14:24:14 -0600 Subject: Make the tooltip a feature of IconButton --- framework/qml/IconButton.qml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'framework') diff --git a/framework/qml/IconButton.qml b/framework/qml/IconButton.qml index 302e51b0..8fd8b705 100644 --- a/framework/qml/IconButton.qml +++ b/framework/qml/IconButton.qml @@ -23,6 +23,7 @@ AbstractButton { id: root property alias iconName: icon.iconName + property alias tooltip: toolTipItem.text width: Units.gridUnit + leftPadding + rightPadding height: Units.gridUnit + topPadding + bottomPadding @@ -33,5 +34,10 @@ AbstractButton { contentItem: Icon { id: icon } + + ToolTip { + id: toolTipItem + visible: parent.hovered && text != "" + } } -- cgit v1.2.3