Playing a Video file(.wmv) in the entire dialog window

  • I want to play the video file in my dialog window. I used the following codes in my program and its playing on left corner of my dialog window with the size of 32*32 , but i want to play the video on my entire Dialog window.

    @ //TestDlg.h
    #include <QDialog>

    namespace Ui {
    class TestDlg;

    class TestDlg : public QDialog

    explicit TestDlg(QWidget *parent = 0);

    Phonon::MediaObject *obj_MediaObject;
    Phonon::VideoWidget *wid_videoWidget;
    Phonon::AudioOutput *aio_audioOutput;

    Ui::TestDlg *ui;
    TestDlg::TestDlg(QWidget *parent) :
    ui(new Ui::TestDlg)

    // setup the objects:
    obj_MediaObject = new Phonon::MediaObject(this);
    wid_videoWidget = new Phonon::VideoWidget(this);
     aio_audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory,this);
    //clear the mediaobject:
    //Put a video in the queue:
    //make the proper connections:
    Phonon::createPath(obj_MediaObject, wid_videoWidget);
    // to link the mediaobject with the video widget.
    Phonon::createPath(obj_MediaObject, aio_audioOutput);
    // to link the mediaobject with audio output.  

    //play the video:


  • Moderators

    You didn't use a layout in your dialog. By default a widget will be placed at the top right then.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.