[Qt-interest] How to find full screen size

Kushal Das kushaldas at gmail.com
Mon May 25 06:53:05 CEST 2009


On Mon, May 25, 2009 at 3:14 AM, Andrew Hodgkinson
<ahodgkinson at endurancetech.co.uk> wrote:
> Ferenc Stelcz wrote:
>
> It's not ideal to assume that your application is on the default screen;
> I was using the following code for a while:
>
>   QDesktopWidget * desktop   = qApp->desktop();
>   int              screenNum = desktop->screenNumber();
>   QRect            geometry  = desktop->availableGeometry( screenNum );
>   QSize            size( geometry.width(), geometry.height() );
>
> The "desktop->screenNumber" call returns the number of the screen in
> which the greatest portion of your application is visible.
>
Thank you :)

Kushal
-- 
http://fedoraproject.org
http://kushaldas.in




More information about the Qt-interest-old mailing list