Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.0
-
-
ca27c051a (dev)
Description
import QtQuick import QtQuick.Controls.Material ApplicationWindow { id: window width: 640 height: 480 visible: true title: qsTr("Test") function onRequestDialog() { var dummy = "10"; var cmp = Qt.createComponent("qrc:/main.qml"); var dlg = cmp.createObject(window, {"helper": dummy}); } }
returns this error:
Error: main.qml:29:36: Could not compile function onRequestDialog: Cannot generate efficient code for DefineObjectLiteral var dlg = cmp.createObject(window, {"helper": dummy}); ^^^^^^
In other cases I get this error:
Error: MWAppMainPage.qml:23:33: Could not compile function onRequestDialog: Instruction "generate_StoreLocal" not implemented dlg = component.createObject(appMainPage, {"helper": dialog}); ^^^^^^^^^^^^
using this Qml (excerpt):
Page { id: appMainPage function onRequestDialog(dialog : AbstractDialog) { var component, dlg; if (dialog.modal || !dialog.cancelable) { component = Qt.createComponent("qrc:/imports/test/dialogs/MWAbstractDialog.qml"); dlg = component.createObject(appMainPage, {"helper": dialog}); } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-112485 qmlsc: Support JS object literals
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-107469 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
488380,15 | QmlCompiler: Allow creation of structured value types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |