[Development] QTCS2019 Notes from QtQml session
ulf.hermann at qt.io
Wed Nov 27 09:52:19 CET 2019
>> We brainstormed a bit about how a model could declare its items' data
>> type in QML, so that we could statically check model against delegate
>> types. We will need this when compiling QML 3 to C++. We didn't come up
>> with anything really great, though. This needs more work.
> Just something specifically related to models and delegates: having a
> required property var model
> on the delegate, then using model.foo (just like today), is supposed to
> be a fully supported measure throughout QML2/3 or just a
> deprecated-on-birth porting solution towards explicit required
> properties on the delegate?
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.
More information about the Development