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

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 9 Dec 2019, 15:46 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 9 Dec 2019, 15:51 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
      • Q Offline
        Q Offline
        qwasder85
        wrote on 11 Dec 2019, 14:47 last edited by qwasder85 12 Nov 2019, 14:50
        #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

        2/3

        9 Dec 2019, 15:51

        • Login

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