From 2170f6a46d42704f5fe1b0ff04bf7a9a5992804f Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 07:51:15 +0100 Subject: Improve copy text handling --- components/StandardDialog.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'components/StandardDialog.qml') diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index d3e14b29..044c0a5c 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -113,6 +113,21 @@ Rectangle { textFormat: TextEdit.AutoText readOnly: true font.pixelSize: 12 * scaleRatio + selectByMouse: false + + MouseArea { + anchors.fill: parent + onClicked: { + appWindow.showStatusMessage(qsTr("Double tap to copy"),3) + } + onDoubleClicked: { + parent.selectAll() + parent.copy() + parent.deselect() + console.log("copied to clipboard"); + appWindow.showStatusMessage(qsTr("Content copied to clipboard"),3) + } + } } } -- cgit v1.2.3