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

Change QWindowContainer to not create native child widgets



    • 72a7882cec07a9ad187c9e1772fb08f59a4b9519


      Any application that uses QWidget::createWindowContainer to embed GL or QML ends up with a chain of native child widgets going from the embedded window up to the root. This was originally done because:

      • Solves clipping to parent items
      • Solves positioning in the hierarchy
      • Solves overlapping widgets
      • Native child windows "already work"

      However, native child widgets are very expensive to resize and redraw, and will most likely also cost us more in terms of memory as each widget potentially gets its own window surface. For instance, resizing the "designer" window in Qt Creator takes several hundred milliseconds because of the native child widgets.

      Instead, we will attach the embedded window directly to the root window and don't use native child widgets at all. That keeps the rest of the app performant.

      Certain things needs to be done:

      • Document that overlapping widgets will not stack according to QWidget stacking.
      • We need to make sure that dockwidget, MDI widgets and scroll areas still work with embedding. This can be done by using native child id's in these cases and document that they will perform a lot worse because of it.
      • Extend the tests to include dock widgets, MDI widgets and scroll areas.


        Issue Links

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



              sletta Gunnar Sletta
              sletta Gunnar Sletta
              0 Vote for this issue
              2 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes