Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QQuickWidget on QGraphicsScene



  • I have a certain drawing in a qml where I am loading a few images. I am loading this qml on a QQuickWidget pointer using:

    m_quickWidget = new QuickWidget(QUrl("......"));

    Then I have done the following:

    QWidget *baseWid = new QWidget();
    baseWid->setGeometry(.......);
    layer->QMLItem()->setParent(baseWid);
    //layer->QMLItem() returns m_quickWidget
    scene()->addWidget(baseWid);
    //Add QWidget to QGraphicsScene (returned by scene())

    Now, I am able to see all my drawings that were done in qml, but the images that I loaded are getting blurred(stretched).If I directly show m_quickWidget instead of adding to QGraphicsScene, image is clear.

    What should i do to get the drawing right, using QGraphicsScene?


Log in to reply