Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QVideoWidget inside a GraphicsView

QVideoWidget inside a GraphicsView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 793 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cedrix
    wrote on last edited by
    #1

    Hello,

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

    @QMediaPlayer *player = new QMediaPlayer();
    QVideoWidget videoWidget;
    player->setVideoOutput(&videoWidget);
    QGraphicsScene scene;
    QGraphicsProxyWidget *proxy
    = scene.addWidget(&videoWidget);
    QGraphicsView view(&scene);
    player->setMedia(
    QUrl::fromLocalFile("/home/cedric/Vidéos/musique_21sec.mp4"));
    player->play();
    view.show();@
    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved