[Development] QTCS2019 Notes from QtQml session

Milian Wolff milian.wolff at kdab.com
Wed Nov 27 11:39:24 CET 2019


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 | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191127/f6b4f8e2/attachment-0001.bin>


More information about the Development mailing list