PDA

View Full Version : Display video in a GUI



aguleo
30th May 2013, 12:20
Hi,
When creating a GUI Application with Qt Creator, what widget must i use do display the video?
I have this code but how do i insert the "video" in the ui?




...
media = new QMediaPlayer(this);
video = new QVideoWidget(this);
media->setVideoOutput(video);
...
...
QUrl url(QFileInfo(nomeDoFicheiro).absoluteFilePath());
media->setMedia(url);
media->play();
...

Lykurg
30th May 2013, 15:42
? QVideoWidget behaves like a normal widget.

aguleo
30th May 2013, 17:37
yes but ... how to insert it when usin QtDesigner?
I have to create it and then add to the layout?!

Lykurg
31st May 2013, 20:51
Hi, sorry for late response. You can insert a normal widget in Qt Designer and then promote it to QVideoWidget.