Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141829

Loader is always in synchronous mode when using custom window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.15, 6.9.3, 6.10
    • None
    • All

      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.

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            michalc Michał Cieślak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes