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

Graphics corruption with transparent QQmlWidget on QGraphicsProxyWidget

    XMLWordPrintable

Details

    Description

      I get the following graphics corruption.
      I want to display a transparent QML widget in QGraphicsScene.

          auto obj = new QGraphicsProxyWidget(this); // 'this' is a QGraphicsItem 
          obj->setAutoFillBackground(false);
      
          auto widg = new QQuickWidget;
          widg->setStyleSheet("background-color: rgba(0,0,0,0)");
          widg->setAutoFillBackground(false);
          widg->setSource(QUrl("qrc:/DummyProcess.qml"));
          widg->setClearColor(Qt::transparent);
          widg->setAttribute(Qt::WA_TranslucentBackground, true);
          widg->show();
      
          obj->setWidget(widg);
      

      My QML :

      import QtQuick 2.3
      
      Item {
          id: root
          width: 200
          height: 100
      
          Text {
              text: 'toto'
              color: "yellow"
          }
      }
      

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            jcelerier Jean-Michaël Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes