1 Attachment(s)
How to display QVideowidget on a secondary mainwindow
Code:
QVideoWidget *vw = new QVideoWidget() ;
QMediaPlayer * mp = new QMediaPlayer(vw);
mp
->setMedia
(QUrl::fromLocalFile(vidstring
));
mp->setVideoOutput(vw);
vw->setGeometry(100, 100, 500, 500);
vw->show();
mp->play();
}
[ATTACH=CONFIG]13138 i want to make the video display inside the window on the right side
Am having two classes one contain the main window while the other also has it own window,
whenever I play the video the Qvideowiget has it own window, I want to display the QVideowidget
inside the second windows, but all my effect has not been fruitful... thanks in advance ```
Re: How to display QVideowidget on a secondary mainwindow
Create the video widget as a child of the widget it should be contained in and add it to that container's layout.
Just like with any other widget.
Cheers,
_