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

qmltc: WebEngineView with anchors causes assertion at component creation

    XMLWordPrintable

Details

    • 332170d46 (dev), 879eb17d7 (6.7)

    Description

      Code

      // Main.qml
      import QtWebEngine
      
      WebEngineView {
          anchors.left: undefined // or anchors.fill: parent
      }
      
      // main.cpp
      #include <main.h>
      
      int main(int argc, char **argv) {
          QtWebEngineQuick::initialize();
          QGuiApplication app{argc, argv};
      
          QQmlEngine engine;
          auto main = new App::Main(&engine); // Crashes here
      
          return app.exec();
      }
      

       

      Outcomes

      Qt 6.6.1 gives

      ASSERT: "unit" in file C:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlengine.cpp, line 2046
      

       

      Notes

      • The assertion does not occur if we have no anchors in Main.qml
      • The assertion does not occur if we replace WebEngineView with Item
      • qmltc cannot compile this project in Qt 6.5.4 because of problems with QtWebChannel\plugins.qmltypes ("Meta object revision and export version differ")

      Attachments

        1. Templates.qml
          0.1 kB
        2. webengine_qmltc.zip
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-122321
          # Subject Branch Project Status CR V

          Activity

            People

              diseraluca Luca Di Sera
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes