Details
-
Epic
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
-
Unify QML syntax for MCU, QDS and QML compiler
Description
Currently there is no subset of QML that work with the QML compiler, MCU and Qt 5.15.
We will not support Qt 5.15 for ever, but the QML dialect for MCU and QML compiler has to be unified.
In the context of Qt Design Studio we identified 3 differences:
1) PropertyChanges
PropertyChanges in Qt 5 and MCU have the follwowing syntax:
PropertyChanges { target: someId someProperty: someValuleOrBinding }
A single PropertyChanges can only have one target.
The QML compiler only supports the following syntax, which was introduced in Qt 6:
PropertyChanges {
//no target
someId.someProperty: someValuleOrBinding
}
https://doc.qt.io/qt-6/qml-qtquick-propertychanges.html
Multiple different target items are possible.
In Qt Design Studio we would like to move exclusively to the new syntax, but for this MCU has to support it.
2) Connections
Qt 5.15 already supports the new Connections syntax which is a requrement for the QML compiler.
Connections { function onClicked(mouse) { foo(mouse) } }
https://doc.qt.io/qt-6/qml-qtqml-connections.html
3) Signal Handlers
Qt 5.15 already supports the new signal handler syntax which is a requrement for the QML compiler.
MouseArea { onClicked: (mouse)=> { foo(mouse) } }
https://doc.qt.io/qt-6/qml-qtqml-connections.html
If MCU would support the new syntax in each case, it would be possible to generate code that works for MCU and the QML compiler and Qt Design Studio would have to support different versions, which increases the complexity needlesly.