Important: Please read the Qt Code of Conduct -

[SOLVED] Surface video is not clean at all (QGraphicsScene/QGraphicsVideoItem/QGraphicsView)

  • Hello,
    so, I'm having problem of rubbish pieces of surface where is not shown video.
    My code looks like this:
    QGraphicsScene *scene = new QGraphicsScene(this);

    videoItem = new QGraphicsVideoItem;
    _graphicsView = new QGraphicsView(scene);
    _graphicsView->setViewport(new QGLWidget);
    _graphicsView->fitInView(videoItem, Qt::KeepAspectRatio);

    Video is shown correctly, but rubbish pixels (pieces of other apps) are shown outside video's aspectratio.

    How can I clean all surface and not just where video takes place?

  • Ok, I found the correct way and post it to help someone in the future:

    This call clean the opengl surface at all.

Log in to reply