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();
}
QVideoWidget *vw = new QVideoWidget() ;
QMediaPlayer * mp = new QMediaPlayer(vw);
QString vidstring = QFileDialog::getOpenFileName(this, "Select video file", QDir::homePath());
mp->setMedia(QUrl::fromLocalFile(vidstring));
mp->setVideoOutput(vw);
vw->setGeometry(100, 100, 500, 500);
vw->show();
mp->play();
}
To copy to clipboard, switch view to plain text mode
[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 ```
Bookmarks