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

[Regr: 6.8 -> 6.9.0] QQuickWidget background color is pure black with QSGRendererInterface::OpenGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9.0
    • GUI: OpenGL, Quick: Widget
    • None
    • Windows

    Description

       

      op//代码占位符
      #include "mainwindow.h"#include <QApplication>
      #include <QQuickStyle>
      #include <QQuickWidget>int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QQuickStyle::setStyle("Material");                QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);    
            MainWindow w;
          w.show();
          return a.exec();
      }
      

      If I force set the graphicApi to OpenGL, the QQuickWidget background will be pure black for a Qt::Popup widget
      The same code works well in Qt 6.8.*, but not work with 6.9.0
      Qt 6.8.3

      6.9.0

       

      Reproducible source code attached.

       

      Attachments

        1. image-2025-05-28-16-25-26-752.png
          11 kB
          Xiaowei Li
        2. image-2025-05-28-16-26-02-047.png
          10 kB
          Xiaowei Li
        3. TestQmlWidget.zip
          8 kB
          Xiaowei Li
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            robbie_li Xiaowei Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes