-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.15, 6.9.3, 6.10
-
None
When using own custom c++ type derived from QQuickWindow, Loader component works always in synchronous mode, even with asynchronous property set to true.
This behavior is caused by fact that Window instantiates QQuickWindow but not directly, there is middleware private class QQuickWindowQmlImpl doing extra stuff in the middle. That class sets incubation controller in the overridden classBegin method.
It's not clear from the documentation that it should be done manually when inheriting from `QQuickWindow`. It leads to confusion and hard to track issues. Ideally it should be described in "Detailed description" section of QQuickWindow's doc. The thing is mentioned in https://doc.qt.io/qt-6/qquickwindow.html#incubationController, in context of QQuickView. The same is true for qml's Window and ApplicationWindow. Moreover it's very easy to overlook when inheriting from QQuickWindow.
Other option is to do the initialization directly in QQuickWindow.