moment/harmonyqml/components/base/ToolTipLabel.qml

20 lines
371 B
QML
Raw Normal View History

2019-03-22 14:28:14 +11:00
import QtQuick 2.7
import QtQuick.Controls 2.0
HLabel {
property string toolTipText: ""
2019-03-22 14:28:14 +11:00
id: text
2019-03-22 14:28:14 +11:00
ToolTip {
delay: Qt.styleHints.mousePressAndHoldInterval
visible: text ? toolTipZone.containsMouse : false
text: toolTipText
2019-03-22 14:28:14 +11:00
}
MouseArea {
id: toolTipZone
anchors.fill: parent
hoverEnabled: true
}
}