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 screen of your app
Forum Update on Monday, May 27th 2025

Get screen of your app

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.7k 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.
  • E Offline
    E Offline
    EMStegehuis
    wrote on last edited by
    #1

    With the switch to QT 5.13.2 we are updating code that uses QDesktopWidget.

    What is the proper way to find the QScreen that your application is running on (the mainwindow at least). And thus be able to get the geometry?

    Regards,

    Marcel

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Maybe this can help `
      https://forum.qt.io/topic/98160/find-the-active-qscreen-of-any-qwidget

      1 Reply Last reply
      1
      • qwasder85Q Offline
        qwasder85Q Offline
        qwasder85
        wrote on last edited by qwasder85
        #3
        QScreen* p_screen = QApplication::screens().at(0); //Returns the "main" screen
        

        Edit: Ah, sorry. This will NOT return the screen that your main window is located on, only what Windows considers your main display.

        1 Reply Last reply
        1

        • Login

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