Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.0.0
-
Windows 10 MSVC v.14.28
Description
Not sure if this happened in version < Qt6.0.0, but this would be out of scope for those versions (IMAO).
I found out, that QML Objects are added first to the QQmlListProperty, and then they are initialized with the property bindings.
This should be the other way around.
QML Objects should be created from the leaves to the root.
The code below will first call the QQmlListProperty's append handler, and then the setter for the dataADep and dataBDep properties.
I would expect an item to be inserted after construction in qml. This is the only efficient way to do some magic under the hood for own QMLTypes. It is also a wrong behaviour of a declarative scripting language.
Example:
Unable to find source-code formatter for language: qml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
MyItem{//... data1s: [ Data1{ id: data11//... }, Data1{ id: data12//... }, Data1{ id: data13//... },//... ] data2s: [ Data2{ dataADep: data11//... dataBDep: data12//... }, Data2{ dataADep: data11//... dataBDep: data13//... },//... ] //... }