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

[REG 5.15->6.5] The crash after QWidget::setParent() call for QWebEngineView

    XMLWordPrintable

Details

    • Windows

    Description

      1. Construct QWebEngineView widget.
      2. Create QMainWindow widget.
      3. 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

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            lserge Serge Lysenko
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes