2019-07-10 12:51:52 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.0
|
|
|
|
|
|
|
|
ToolTip {
|
2019-07-10 13:42:03 +10: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-10 12:51:52 +10:00
|
|
|
delay: Qt.styleHints.mousePressAndHoldInterval
|
2019-07-10 13:42:03 +10:00
|
|
|
padding: 0
|
2019-07-10 12:51:52 +10: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-10 13:49:59 +10:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
propagateComposedEvents: true
|
|
|
|
onClicked: { toolTip.close(); mouse.accepted = false }
|
|
|
|
}
|
2019-07-10 12:51:52 +10:00
|
|
|
}
|