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
This commit is contained in:
Khushboo Mehta 2021-08-12 16:30:46 +02:00 committed by Michał Cieślak
parent c58118a6e2
commit dc7ae4cce3
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ Rectangle {
property bool loading: false property bool loading: false
property alias hovered: sensor.containsMouse property alias hovered: sensor.containsMouse
property alias tooltip: statusToolTip
property bool highlighted: false property bool highlighted: false
@ -151,4 +152,9 @@ Rectangle {
onReleased: statusFlatRoundButton.released(mouse) onReleased: statusFlatRoundButton.released(mouse)
onPressAndHold: statusFlatRoundButton.pressAndHold(mouse) onPressAndHold: statusFlatRoundButton.pressAndHold(mouse)
} // Sensor } // Sensor
StatusToolTip {
id: statusToolTip
visible: !!text && parent.hovered
} // Tooltip
} // Rectangle } // Rectangle