1
0

qml: refactor qr scan to qt6

As the method of capturing frames is totally different, the animation when
a QR is found has been removed.
This commit is contained in:
Sander van Grieken
2023-07-19 14:13:10 +02:00
parent 65d41ccc49
commit a77ff9943a
9 changed files with 205 additions and 209 deletions

View File

@@ -19,6 +19,11 @@ ElDialog {
padding: 0
topPadding: 0
onAboutToHide: {
console.log('about to hide')
qrscan.stop()
}
function restart() {
qrscan.restart()
}
@@ -34,6 +39,13 @@ ElDialog {
}
}
// override
function doClose() {
console.log('SendDialog doClose override') // doesn't trigger when going back??
qrscan.stop()
Qt.callLater(doReject)
}
ColumnLayout {
anchors.fill: parent
spacing: 0
@@ -55,7 +67,10 @@ ElDialog {
Layout.preferredWidth: 1
icon.source: '../../icons/copy_bw.png'
text: qsTr('Paste')
onClicked: dialog.dispatch(AppController.clipboardToText())
onClicked: {
qrscan.stop()
dialog.dispatch(AppController.clipboardToText())
}
}
}