Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2008
Phonon and video width/height


Message 1 in thread

Hi.
I don't understand, how to get width and height of video. There are no
appropriate methods in MediaObject and VideoWidget.

--
 [ signature omitted ] 

Message 2 in thread

troorl wrote:
> Hi.
> I don't understand, how to get width and height of video. There are no
> appropriate methods in MediaObject and VideoWidget.
Create a new QApplication,
	QApplication myApp(argc, argv);

Get a pointer to the application desktop,
	QDesktopWidget *desktop = QApplication::desktop();

Get the width and height from the pointer,
	int width = desktop->width();
	int height = desktop->height();

--
 [ signature omitted ] 

Message 3 in thread


"John McClurkin" <jwm@xxxxxxxxxxx> wrote in message 
news:fr3bqu$otn$1@xxxxxxxxxxxxxxxx
> troorl wrote:
>> Hi.
>> I don't understand, how to get width and height of video. There are no
>> appropriate methods in MediaObject and VideoWidget.
> Create a new QApplication,
> QApplication myApp(argc, argv);
>
> Get a pointer to the application desktop,
> QDesktopWidget *desktop = QApplication::desktop();
>
> Get the width and height from the pointer,
> int width = desktop->width();
> int height = desktop->height();

Errr... this will result in an application with the size of the desktop (but 
not nessecairaly centered). That was not the question I believe. The 
question was how to the size of a video.

André 

--
 [ signature omitted ]