Important: Please read the Qt Code of Conduct -

QVideoWidget inside a GraphicsView

  • Hello,

    I am trying to put a QVideoWidget inside a QGraphicsView but it doesn't work.

    @QMediaPlayer *player = new QMediaPlayer();
    QVideoWidget videoWidget;
    QGraphicsScene scene;
    QGraphicsProxyWidget *proxy
    = scene.addWidget(&videoWidget);
    QGraphicsView view(&scene);
    With that I get only a black window. The sound is playing thought. Anyone know what is wrong? With a QraphicsVideoItem it is working but I don't want to use it since It doesn't allow to change brightness. Outside of a QGraphicsView the QVideoWidget works well.

    Thanks in advance

Log in to reply