[Development] Improving QtQuick internals (was Re: QML engine changes)

Nils Jeisecke njeisecke at saltation.de
Fri Jun 28 10:48:27 CEST 2013


Hi Alan,

On Fri, Jun 28, 2013 at 9:25 AM, Alan Alpert <416365416c at gmail.com> wrote:
> There is. The QQuickItem tree and the QObject tree are technically
> separate. Usually when you assign QQuickItem parentage it also assigns
> QObject parentage, but that's because of how the QML language
> implicitly defines a QObject tree in a similar way to how QQuickItem
> does it. Using "parent:" messes that up.
thank you very much for your comments. But wouldn't this classify any
reparenting of objects that are declared in the tree as "bad Qml"? Or
does it make any difference whether parent is assigned during
initialization (like in the example) or afterwards (e.g. in a state
change).
If it does that would imply an undefined behavior, which should be
forbidden or at least generate a warning.

Unfortunately using Qml also means experimenting a lot. And if
something works as expected, you're easily tempted to consider this as
good practice ;-)

Nils



More information about the Development mailing list