29107ca7f2
Fix hovered avatar staying visible when cursor goes outside of window (in most cases)
27 lines
572 B
QML
27 lines
572 B
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
|
|
ToolTip {
|
|
// Be sure to have a width and height set, to prevent the tooltip from
|
|
// going out of the window's boundaries
|
|
|
|
id: toolTip
|
|
delay: 150
|
|
padding: 0
|
|
|
|
enter: Transition {
|
|
HNumberAnimation { property: "opacity"; from: 0.0; to: 1.0 }
|
|
}
|
|
exit: Transition {
|
|
HNumberAnimation { property: "opacity"; from: 1.0; to: 0.0 }
|
|
}
|
|
|
|
TapHandler {
|
|
onTapped: { toolTip.hide() }
|
|
}
|
|
|
|
HoverHandler {
|
|
onHoveredChanged: if (!hovered) { toolTip.hide() }
|
|
}
|
|
}
|