Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get Desktop Geometry, on the actual monitor, WITHOUT the Taskbar
Forum Updated to NodeBB v4.3 + New Features

Get Desktop Geometry, on the actual monitor, WITHOUT the Taskbar

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 7.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cdebel2005
    wrote on last edited by
    #1

    Greetings,

    I would like to know if there's a way to get the desktop width & height that doesn't include the taskbar on Windows (and whatever the name you give it on other OSes)?

    I've tried to get it with QApplication::desktop()->availableGeometry(), but if my screen resolution is 1920x1200, it return me 1920x1200... not a smaller view that doesn't include the taskbar.

    thanks
    Christian

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      The following code works for me:
      @QRect screenGeometry = QApplication::desktop()->availableGeometry();
      qWarning("availableGeometry: %dx%d", screenGeometry.width(), screenGeometry.height());@

      Output:
      @availableGeometry: 1920x1040@

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cdebel2005
        wrote on last edited by
        #3

        Not for me... it give me 1200 lines while it should be approx 1130 because the taskbar take some space.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MuldeR
          wrote on last edited by
          #4

          For what it's worth: I'm using Qt 4.8.3 on Windows 7 (MSVC 2010).

          My OpenSource software at: http://muldersoft.com/

          Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

          Go visit the coop: http://youtu.be/Jay...

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved