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

REG: QQuickWidget does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 6.0.0 Beta1
    • 6.0.0 Alpha
    • Qt RHI, Quick: Widget
    • None
    • All
    • bb263b057df71144428fd1981eba7e505bf22b89 (qt/qtdeclarative/dev)

      QQuickWidget no longer works in Qt 6. This was ported to RHI at some point (as long as OpenGL was selected as the backend), but has since then regressed.

      I tested with the following code on Linux and Windows (QSG_RHI_BACKEND=opengl), and the content is not displayed on either.

      main.qml (added to resources):

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Text {
          visible: true
          width: 640
          height: 480
          text: "foobar"
      }
      

      and

      main.cpp:

      #include <QtGui>
      #include <QtWidgets>
      #include <QtQuickWidgets>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QQuickWidget qw(QUrl{"qrc:/main.qml"});
          qw.show();
          return app.exec();
      }
      

      On Linux, the window is completely black and on Windows, the window is completely black. On both platforms, the following error is displayed on the console:

      virtual void QPlatformBackingStore::composeAndFlush(QWindow*, const QRegion&, const QPoint&, QPlatformTextureList*, bool) no opengl support set
      

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

            lagocs Laszlo Agocs
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes