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

Using QWebEngineView created by new (even initialized) in QDialog causes the dialog to close

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • None
    • 6.8.2, 6.9.1
    • None
    • Linux, MacOS, Windows with Qt 6.8.0 through Qt 6.9.1
    • All

      Any use of a dynamically created QWebEngineView (created with new) inside a QDialog causes the QDialog to exit and somehow impacts the MainWindow.

      This occurs even if the QWebEngineView uses setURL to set the about:blank url in its constructor.

      All of this code worked properly through Qt5 and Qt6 up though Qt6.7 but for Qt 6.8 and later it is very broken.

      I had to cut down some code way down (borrowed from Sigil) to get a working example. I will attach the demo bug program. It can be built with qmake.

      When launched it should open a MainWindow which opens a QDialog that presents a list of files, allowing users to select one or more of the files and dynamically creates a new non-modal QDialog viewer (one for text and one for image files) for each of the selected files.

      The text file viewer works exactly as expected. But if you select even just one of the image jpg files (included in the demo program inside the included site folder), the viewer QDialog is killed, the base List selector QDialog is closed and MainWindow seems to be impacted to the point I have to use killall -9 to get rid of it at times.

      When run in a debugger, no error messages or fault signals are detected.

      Please see the attached: webdlgbug.zip demo program

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

            moheim Moss Heim
            kevinhendricks Kevin B. Hendricks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes