Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Play videos on graphicsview.(on Qt5 form graphics view)
Anveshkumar last edited by
I am using Qt5 with C++ in Windows7 . Can any one tell how to play videos on form widget (graphicsview).I got the proper out put with QVideowidget.But for my application i need play videos on form . I tryed this code form Qt documentation but i got errors
player = new QMediaPlayer(this);
QGraphicsVideoItem *item = new QGraphicsVideoItem;
Error: graphicsView not declared in this scope.
if i write in the place of graphic view as ui->graphicsView->scene()->additem(item); , my Qt compiler stop working and suddenly stoped .
Paradiso last edited by
I had the same problem.
What I have done is to initialize the scene object.
QGraphicsScene *scene=new=new QGraphicScene();