Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.3
-
None
-
-
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:
- Instantiate a QMainWindow.
- Create a QDockWidget with a title and allow it to be docked in all areas of the main window.
- Instantiate a background QWidget and make it a native window using winId().
- Instantiate a QQuickWidget with the background widget as its parent and set the placeholder QML content.
- Create a window container for the background widget's native window handle via createWindowContainer API.
- 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.zip
added to reproduce the issue.