On Mittwoch, 27. November 2019 10:35:23 CET Giuseppe D'Angelo via Development wrote: > Il 27/11/19 09:52, Ulf Hermann ha scritto: > > That depends on how we do the model/delegate matching mentioned above. > > As stated above, I don't have a solution, yet. If you have an idea, let > > us know. I can imagine generating some C++ from such code that does the > > model/delegate matching at run-time via the metaobject system. That way > > we would support var models. > > Well, neither do I :) It would also be nice to find a similar solution > for widgets and delegates. And to be honest such solution could also > come later than 6.0? > > The other side of the question, for long term running projects, is > simply: will the injected "model" required property on delegate > properties be fully supported throughout QML2/3 or is it immediately > deprecated and just a porting measure?
Personally, I hope the answer is that this will remain supported. The only
disadvantage is the runtime type introspection, which should/could be solved
via Ulf's idea of something like an inline interface/trait component. Such
that eventually we can do something like:
```
interface ModelData { // syntax is open, just to give an idea
required property string text
required property int answer
}
delegate: Text {
required property ModelData model // model is a misnomer, but I digress
text: model.text + model.answer
}
```
Cheers
--
Milian Wolff | [email protected] | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
