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

QuickWidget wrapped under a window container doesn't render

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.3
    • Qt RHI, Quick: Widget
    • None
    • Linux/Wayland, Windows
    • Linux/Wayland, Windows

    Description

      In Qt version 6.8.3, a QQuickWidget wrapped within a QWidget::createWindowContainer fails to render automatically by default. The sample application code provided renders correctly in Qt version 6.5.3, presenting green QQuickWidget content. However, in Qt 6.8.3, the QQuickWidget content does not render automatically.

      This approach with window container was suggested previously to help avoid cases where reparenting of widgets with different surface types, would often result in recreating the new top level window's entire tree. 

      Steps to Reproduce:

      1. Instantiate a QMainWindow.
      2. Create a QDockWidget with a title and allow it to be docked in all areas of the main window.
      3. Instantiate a background QWidget and make it a native window using winId().
      4. Instantiate a QQuickWidget with the background widget as its parent and set the placeholder QML content.
      5. Create a window container for the background widget's native window handle via createWindowContainer  API.
      6. Set this container as the widget for the dock widget.

      Expected Behavior:

      • When running the sample application in Qt version 6.5.3, the QQuickWidget content within the QDockWidget renders automatically, presenting a green rectangle.

      Actual Behavior:

      • When running the sample application in Qt version 6.8.3, the QQuickWidget content within the QDockWidget does not render automatically, resulting in an empty container.

      Additional Notes:

      • In the sample, we are using QuickWidget to quickly reproduce the problem. In actual use case, this happens when using QWebEngineView.
      • The issue seems to be related to the RHI not being available when QBackingStoreDefaultCompositor::flush is called by QWidgetRepaintManager, resulting in an early return.
      • QTBUG-137415.zipadded to reproduce the issue.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            kandass1 Senthil Kannan Kandaswamy
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes