Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

[SOLVED] Get the availableGeometry of monitor WITH the taskbar on Windows

$
0
0
While in the showMaximized mode, I’m trying to set a background image to my mainwindow by obtaining the size of the screen using QRect rect = desktopWidget->availableGeometry(); But this returns the size of the screen excluding the taskbar. I read in the documentation that if int screen = -1 then the whole screen would be considered. Where do I specify the parameter? I tried     QRect rect = desktopWidget->availableGeometry(int screen = -1); and     int screen = -1;     QRect rect = desktopWidget->availableGeometry(screen); But I suppose the above two methods are syntactically wrong. Could someone please help me in this regard? Thanks.

Viewing all articles
Browse latest Browse all 22112

Trending Articles