From dc7ae4cce32eaa2f401b61d4c952bf3488377020 Mon Sep 17 00:00:00 2001 From: Khushboo Mehta Date: Thu, 12 Aug 2021 16:30:46 +0200 Subject: [PATCH] feat(StatusFlatRoundButton): Adding tooltip to the button Adding the StatusToolTip to the StatusFlatRoundButton. This will only function when the tooltip text is set from the outside --- ui/StatusQ/src/StatusQ/Controls/StatusFlatRoundButton.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusFlatRoundButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusFlatRoundButton.qml index 792d4593ac..b9e75eac91 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusFlatRoundButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusFlatRoundButton.qml @@ -34,6 +34,7 @@ Rectangle { property bool loading: false property alias hovered: sensor.containsMouse + property alias tooltip: statusToolTip property bool highlighted: false @@ -151,4 +152,9 @@ Rectangle { onReleased: statusFlatRoundButton.released(mouse) onPressAndHold: statusFlatRoundButton.pressAndHold(mouse) } // Sensor + + StatusToolTip { + id: statusToolTip + visible: !!text && parent.hovered + } // Tooltip } // Rectangle