blob: 1bf6b200242f88cf0d118391c0d98f427a2412fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* A for markdown rendering
* This Control accepts clicks for urls!
*/
import QtQml
import QtQuick 6.7
import QtQuick.Controls 6.7 as QQC2
QQC2.Label {
textFormat: Text.MarkdownText
wrapMode: Text.WordWrap
onLinkActivated: link => Qt.openUrlExternally(link)
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
|