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:
parent
c58118a6e2
commit
dc7ae4cce3
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue