2019-04-18 00:54:55 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
|
|
|
|
HLabel {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: label
|
2019-04-18 00:54:55 +10:00
|
|
|
textFormat: Text.RichText
|
|
|
|
|
|
|
|
MouseArea {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: mouseArea
|
2019-04-18 00:54:55 +10:00
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
|
|
onPositionChanged: function (event) {
|
|
|
|
cursorShape = label.linkAt(event.x, event.y) ?
|
|
|
|
Qt.PointingHandCursor : Qt.ArrowCursor
|
|
|
|
}
|
|
|
|
|
|
|
|
onClicked: function(event) {
|
|
|
|
var link = label.linkAt(event.x, event.y)
|
|
|
|
if (link) { Qt.openUrlExternally(link) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|