feat(Common/Tooltip/TooltipArea): supports wheel events to hide tooltip

This commit is contained in:
Ronan Abhamon 2016-11-23 10:39:21 +01:00
parent 87ee80bb88
commit e4d507ec33

View file

@ -6,15 +6,23 @@ MouseArea {
property alias text: tooltip.text
property var tooltipParent: this
property bool _visible: false
anchors.fill: parent
hoverEnabled: true
scrollGestureEnabled: true
onContainsMouseChanged: _visible = containsMouse
onPressed: mouse.accepted = false
onWheel: {
_visible = false
wheel.accepted = false
}
Tooltip {
id: tooltip
parent: tooltipParent
visible: containsMouse
visible: _visible
}
}