moment/harmonyqml/components/base/RichLabel.qml
miruka c866ac87a9 Remove quotes from id: properties
As suggested in the Qt Quick coding style
2019-04-20 17:45:51 -04:00

24 lines
540 B
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
HLabel {
id: label
textFormat: Text.RichText
MouseArea {
id: mouseArea
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) }
}
}
}