1
0
Files
electrum/electrum/gui/qml/components/ScanDialog.qml
Sander van Grieken 32c1915de4 qml: restore Send/ScanDialog for desktop/dev, keeping qr scan Activity for android only.
Also use stable R package, regardless of APP_PACKAGE_DOMAIN used in build.
2023-11-07 10:17:10 +01:00

53 lines
1.1 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import "controls"
// currently not used on android, kept for future use when qt6 camera stops crashing
ElDialog {
id: scanDialog
property string scanData
property string error
property string hint
signal found
width: parent.width
height: parent.height
padding: 0
header: null
topPadding: 0 // dialog needs topPadding override
function doClose() {
qrscan.stop()
Qt.callLater(doReject)
}
ColumnLayout {
anchors.fill: parent
spacing: 0
QRScan {
id: qrscan
Layout.fillWidth: true
Layout.fillHeight: true
hint: scanDialog.hint
onFound: {
scanDialog.scanData = scanData
scanDialog.found()
}
}
FlatButton {
id: button
Layout.fillWidth: true
text: qsTr('Cancel')
icon.source: '../../icons/closebutton.png'
onClicked: doReject()
}
}
}