-
Notifications
You must be signed in to change notification settings - Fork 0
/
Note.qml
52 lines (44 loc) · 1.18 KB
/
Note.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import QtQuick 2.12
import QtQuick.Controls 2.12
import org.kde.prison 1.0 as Prison
//import de.bibuweb.mnotes 1.0
NoteFormular {
property alias note: note
id: note
property int indexId
property string noteObjName: textArea.objectName
property alias qrcode: qrcode
anchors.fill: parent
Accessible.name: "mnotesHandler"
textArea.persistentSelection: true
textArea.onPressed: {
//console.log(event.button)
if (event.button === Qt.RightButton && textArea.selectedText.length > 0)
{
console.log(textArea.selectedText)
popup.x = event.x
popup.y = event.y
qrcode.open()
}
}
Popup{
id: popup
// closePolicy: Popup.CloseOnReleaseOutside
padding: 10
contentItem: Image {
id: popupImage
source: "qrc:/images/qrcode.png"
}
}
Popup{
id: qrcode
width: appWindow.width - 4
height: width
anchors.centerIn: Overlay.overlay
contentItem: Prison.Barcode{
anchors.fill: parent
content: textArea.selectedText
barcodeType: "QRCode"
}
}
}