Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.5.5
Description
- Construct QWebEngineView widget.
- Create QMainWindow widget.
- Put QWebEngineView widget into QMainWindow with setParent() call.
The example project called "WebEngineCrashTest" can be used to re-create the issue. This application shows both a MainWindow and a QWebEngineView. Then when you click the button in the MainWindow, the QWebEngineView is reparented to have the MainWindow as it's parent. It then displays the QWebEngineView in the MainWindow.
When doing this is can be observed that the parent widget is destroyed then recreated again.
Also after reparenting the QWebEngineView, the MainWindow is briefly hidden, and reappears centered on the window's current screen.
Setting qputenv("QT_WIDGETS_RHI", "1"); before creating any of the windows appears to fix the issue in this small example. However it is not well documented as pointed out in https://bugreports.qt.io/browse/QTBUG-112390.
Attachments
Issue Links
- duplicates
-
QTBUG-119221 The mainwindow will be recreated when add a QWebEngineView to it
-
- Closed
-