PDA

View Full Version : changing a dialog according to the display size



manmohan
26th December 2008, 19:48
Hi to all,

Thanks for your support and help...

I have made a simple dialog.. which occupy the screen size(18.5")... of my desktop... but when I use it on another desktop with(17"). I am unable to see the complete application....

May I know if there's a chance to set the program automatically set the size according to the screen size...??????????:(:(

Thanks for the help in Advance...:D

jpn
26th December 2008, 20:49
The screen size is available through QDesktopWidget.

manmohan
29th December 2008, 16:43
Thanks for the reply dude....

but if you could provide me a simple example that might help me in understanding the usage of the qdesktopwidget accordingly....

a simple way of using as I use designer to design the dialog....

so please provide me simple example....

spirit
29th December 2008, 16:54
#include <QDesktopWidget>
....
resize(qApp->desktop()->width(), qApp->desktop()->height));
....