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. Understanding QtMultimediaWidget (solved)
Qt 6.11 is out! See what's new in the release blog

Understanding QtMultimediaWidget (solved)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 593 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    What is the relationship between QGraphicsVideoItem, QGraphicsScene, QGraphicView & QmediaPlayer.
    Each time writing one QtMultimediaWidget, all the above class has to be instantiated.
    Thinking understand their relationship aid writing QtMultimediaWidget.

    @

    videoItem = new QGraphicsVideoItem; 
    videoItem->setSize(QSizeF(640, 480));
    QGraphicsScene *scene = new QGraphicsScene(this);
    QGraphicsView *graphicsView = new QGraphicsView(scene);
    scene->addItem(videoItem);
    mediaPlayer.setVideoOutput(videoItem);          //QMediaPlayer mediaPlayer; //in header file
    

    @

    QGraphicsVideoItem is a graphic item which display video
    QGraphicsScene has no visual appearance of its own act and act a container for QGraphicsVideoItem.
    it display individual scene in videoItem from begining till end.
    QGraphicsView is used to visualize the scene.
    QMediaPlayer is a player

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hackulius
      wrote on last edited by
      #2

      Great.

      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