moment/src/gui/Base/HRichLabel.qml

15 lines
382 B
QML
Raw Normal View History

import QtQuick 2.12
2019-04-18 00:54:55 +10:00
HLabel {
// https://blog.shantanu.io/2015/02/15/creating-working-hyperlinks-in-qtquick-text/
id: label
2019-04-18 00:54:55 +10:00
textFormat: Text.RichText
onLinkActivated: Qt.openUrlExternally(link)
2019-04-18 00:54:55 +10:00
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
2019-04-18 00:54:55 +10:00
}
}