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. QPaintDevice::height(): how to get max. height of screen?
Qt 6.11 is out! See what's new in the release blog

QPaintDevice::height(): how to get max. height of screen?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 377 Views
  • 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.
  • SprezzaturaS Offline
    SprezzaturaS Offline
    Sprezzatura
    wrote on last edited by
    #1

    QPaintDevice::height() returns the height of the application window, not the height of monitor screen.

    Ex: Assume a monitor screen that is 1920 pixels wide and 1024 high. If an app window is resized to 800 x 600, QPaintDevice::height() returns 600, not 1024.

    What function must I call to get the 1024 value?

    1 Reply Last reply
    0
    • nageshN Offline
      nageshN Offline
      nagesh
      wrote on last edited by
      #2

      QRect screenSize = QGuiApplication::primaryScreen()->geometry();

      1 Reply Last reply
      3
      • SprezzaturaS Offline
        SprezzaturaS Offline
        Sprezzatura
        wrote on last edited by
        #3

        BRILLIANT! Exactly what I'm looking for. Thank you :o)

        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