Improve copy text handling

This commit is contained in:
Jaquee
2017-11-02 07:51:15 +01:00
parent e6ada22611
commit 2170f6a46d
6 changed files with 36 additions and 3 deletions

View File

@@ -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)
}
}
}
}