From 1cd19aa5d1be793eb4dbcf4fd542de4ee7c58dd7 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:18:21 +0100 Subject: [PATCH] feat: Add open link to text block context menu --- ChatView/qml/dialog/TextBlock.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ChatView/qml/dialog/TextBlock.qml b/ChatView/qml/dialog/TextBlock.qml index 0cfae5f..607878f 100644 --- a/ChatView/qml/dialog/TextBlock.qml +++ b/ChatView/qml/dialog/TextBlock.qml @@ -33,12 +33,22 @@ TextEdit { anchors.fill: parent acceptedButtons: Qt.RightButton onClicked: contextMenu.open() - propagateComposedEvents: true + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor } Platform.Menu { id: contextMenu + Platform.MenuItem { + text: qsTr("Open Link") + visible: root.hoveredLink.length > 0 + onTriggered: Qt.openUrlExternally(root.hoveredLink) + } + + Platform.MenuSeparator { + visible: root.hoveredLink.length > 0 + } + Platform.MenuItem { text: qsTr("Copy") enabled: root.selectedText.length > 0