[Qt-interest] Getting Screen Resoultion

Frederik Vannoote frederik.vannoote at barco.com
Thu Oct 29 14:08:55 CET 2009


Hi,


You could use layout managers and use the showFullscreen method of
QWidget.

Or you could also get it through here: (snipped from the API of
QApplication)

QDesktopWidget * QApplication::desktop ()   [static]
Returns the desktop widget (also called the root window).

Note that the desktop may be composed of multiple screens, so it would
be incorrect, for example, to attempt to center some widget in the
desktop's geometry. QDesktopWidget has various functions for obtaining
useful geometries upon the desktop, such
as QDesktopWidget::screenGeometry()
and QDesktopWidget::availableGeometry().

On X11, it is also possible to draw on the desktop.




Kind regards,
Frederik




On Thu, 2009-10-29 at 18:27 +0530, Sambhav wrote:
> Hi,
>  
> I am writing an QT application running in fullscreen mode which has to
> work on monitors with resolutions from 1024x768 to 1920x1080. 
> How can I design my UI for varied screen resolutions? i.e Dynamically
> adapt to the screen resoulution. 
>  
>  
> Regards,
> Sambhav 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-- 
Frederik Vannoote
Development Engineer Software

Barco N.V. 
Security & Monitoring Division
President Kennedypark 35
B-8500 KORTRIJK
Belgium
Tel: +32 (0)56 233145
Fax: +32 (0)56 262262
www.barco.com
frederik.vannoote at barco.com



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.





More information about the Qt-interest-old mailing list