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

Broken rendering when reparenting WebEngineView to another window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3, 6.8.0
    • WebEngine
    • None
    • macOS, Windows

    Description

      Rendering is broken (nothing is painted) after reparenting WebEngineView to another window. A number of Qt warnings are also printed in the debug output, e.g:

      Compositor returned null texture
      

      Code sample:

      import QtQuick
      import QtQuick.Controls
      import QtWebEngine
      
      Window {
          id: mainWindow
          width: 300
          height: 300
          title: 'Main '
          visible: true
      
          WebEngineView {
              id: webView
              anchors.fill: parent
              url: 'https://www.qt.io/blog'
          }
      
          Window {
              id: childWindow
              width: mainWindow.width
              height: mainWindow.height
              x: mainWindow.x + mainWindow.width
              y: mainWindow.y
              title: 'Child'
              visible: true
          }
      
          Button {
              z: 1000
              text: (webView.parent === mainWindow.contentItem) ? 'To Child' : 'To Main'
              onClicked: {
                  if (webView.parent === mainWindow.contentItem)
                      webView.parent = childWindow.contentItem
                  else
                      webView.parent = mainWindow.contentItem
              }
          }
      }
      

      Steps to reproduce:
      1. Click "To Child/To Main" button several times
      2. Observe the window content

       

       

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes