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 Pascal Precht
parent ee4296837a
commit 5a0489ba17
1 changed files with 6 additions and 0 deletions

View File

@ -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