2019-07-12 18:02:14 -04:00
|
|
|
import QtQuick 2.12
|
2019-07-13 05:39:01 -04:00
|
|
|
import QtQuick.Controls 2.12
|
2019-07-09 22:51:52 -04:00
|
|
|
|
|
|
|
ToolTip {
|
2019-07-09 23:42:03 -04:00
|
|
|
// Be sure to have a width and height set, to prevent the tooltip from
|
|
|
|
// going out of the window's boundaries
|
|
|
|
|
|
|
|
id: toolTip
|
2019-07-15 16:14:08 -04:00
|
|
|
delay: 150
|
2019-07-09 23:42:03 -04:00
|
|
|
padding: 0
|
2019-07-09 22:51:52 -04:00
|
|
|
|
|
|
|
enter: Transition {
|
|
|
|
HNumberAnimation { property: "opacity"; from: 0.0; to: 1.0 }
|
|
|
|
}
|
|
|
|
exit: Transition {
|
|
|
|
HNumberAnimation { property: "opacity"; from: 1.0; to: 0.0 }
|
|
|
|
}
|
2019-07-09 23:49:59 -04:00
|
|
|
|
2019-07-12 18:02:14 -04:00
|
|
|
TapHandler {
|
|
|
|
onTapped: { toolTip.hide() }
|
2019-07-09 23:49:59 -04:00
|
|
|
}
|
2019-07-24 15:58:43 -04:00
|
|
|
|
|
|
|
HoverHandler {
|
|
|
|
onHoveredChanged: if (!hovered) { toolTip.hide() }
|
|
|
|
}
|
2019-07-09 22:51:52 -04:00
|
|
|
}
|