2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-04-18 00:54:55 +10:00
|
|
|
|
|
|
|
HLabel {
|
2019-07-14 10:15:20 +10:00
|
|
|
// https://blog.shantanu.io/2015/02/15/creating-working-hyperlinks-in-qtquick-text/
|
2019-04-21 07:45:51 +10:00
|
|
|
id: label
|
2019-04-18 00:54:55 +10:00
|
|
|
textFormat: Text.RichText
|
2019-07-14 10:15:20 +10:00
|
|
|
onLinkActivated: Qt.openUrlExternally(link)
|
2019-04-18 00:54:55 +10:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
2019-07-14 10:15:20 +10:00
|
|
|
acceptedButtons: Qt.NoButton
|
|
|
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
2019-04-18 00:54:55 +10:00
|
|
|
}
|
|
|
|
}
|