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

Crash when parenting QWebView to QMainWindow

    XMLWordPrintable

Details

    • macOS
    • 006cbf658ea1f5986bbe1baafa7c146780320661

    Description

      When attempting to parent a QWebView widget to a QMainWindow that already has a QWindowContainer widget in its hierarchy, the application crashes when subsequently calling APIs like raise()/close() on the main window.

      1. Create a QMainWindow instance.
      2. Create a QWindowContainer widget and add it to the QMainWindow's layout.
      3. Create a QWebView widget.
      4. Parent the QWebView widget to the QMainWindow.
      5. Attempt to call APIs like {{raise() }}on the QMainWindow.
      6. Observe the crash.

      Note:

      • Crash can also be observed when calling any other APIs that involve accessing through the window container's QWindow handle (which was destroyed during the parenting step earlier)
      • If this widget is dockable, then docking onto the QMainWindow via drop, drop action would also result in the crash.
      • Crash was tested on MacOS but its likely to happen in other platforms as well.
      • reproducer_app.zip added to reproduce this.

      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
            senthil2023 Senthil Kannan Kandaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes