Allaye
20th May 2019, 10:20
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();
}
[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 ```
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();
}
[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 ```