> However, if you create a new Component object in every > derived type you probably haven't saved a lot of memory
Is not this because of the same long-standing issue? ``` // Base.qml property Component component : Component { id: baseComponent SomeType { } } ``` ``` // Child.qml Base { component: Component { id: childComponent SomeOtherType { } } } ``` QML does not currently allow a way to disable creating `baseComponent`.I read that this is not fixed because of side-effects. But `Component` is not something that can cause side-effects (can it?).
So perhaps `Component` can be treated differently: 1) always garbage collected (does not have parent), so when not referred, it is destroyed. 2) all `Component` properties are deferred by default (so it is not even created in the first place). What do you think?
> What we should actually do is expose deferred properties to QMLThat would be really helpful, but as far as I see it does not help with these:
- The component is changed in derived type at any arbitrary time.- The property has a complex binding that we want to avoid repeating in the derived type.
My understanding is that the garbage collection approach would be fine with both.
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest