Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

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

    General and Desktop
    2
    4
    7046
    Loading More Posts
    • 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
      cdebel2005 last edited by

      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 Reply Quote 0
      • M
        MuldeR last edited by

        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 Reply Quote 0
        • C
          cdebel2005 last edited by

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

          1 Reply Last reply Reply Quote 0
          • M
            MuldeR last edited by

            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 Reply Quote 0
            • First post
              Last post