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:
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user