Qt World Summit: Submit your Presentation

Changing width / height of played video file on phonon video widget

  • Hello,

    In an application when I have ui created in Qt Designer with added QStackedWidget , I create

    Phonon::MediaObject *mediaObject;
    Phonon::MediaSource *mediaSource;
    Phonon::VideoWidget * videow;

    and add videow to the stacked widget by :


    objects creations and connections:

       videow = new Phonon::VideoWidget(this);
       mediaObject = new Phonon::MediaObject(this);
       QString fileName = "video1.avi";
       mediaSource = new Phonon::MediaSource(fileName);


    and then play video file by invoking


    When I run the program built in release mode , having above code ,
    the video file is played on Phonon::VideoWidget that is inserted into QStackedWidget but with dimensions not set by mine at the code above ( w , h ) but with source dimensions of the .avi file ( 640*480 for a case ) file.
    And I get the following warning :
    Warning: driver is sending image at 640x480@

    Does anybody know what is the bug in changing playing video dimensions ?
    Does anybody know how to change display video width , height in the Phonon::VideoWidget ?

    Thanks in advance

Log in to reply