qml: add hack to delay rendering of QR until dialog is shown.
unfortunately, using standard QtQuick Image.asynchronous=true leads to a deadlock at app exit so we can't use it a.t.m.
This commit is contained in:
@@ -58,6 +58,8 @@ ElDialog {
|
||||
|
||||
QRImage {
|
||||
id: qr
|
||||
render: dialog.enter ? false : true
|
||||
qrdata: dialog.text_qr ? dialog.text_qr : dialog.text
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: constants.paddingSmall
|
||||
Layout.bottomMargin: constants.paddingSmall
|
||||
@@ -108,7 +110,13 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
qr.qrdata = dialog.text_qr ? dialog.text_qr : dialog.text
|
||||
Connections {
|
||||
target: dialog.enter
|
||||
function onRunningChanged() {
|
||||
console.log('dialog open animation running changed: ' + dialog.enter.running)
|
||||
if (!dialog.enter.running) {
|
||||
qr.render = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user