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 all (virtual) desktops on a physical Desktop
Forum Updated to NodeBB v4.3 + New Features

get all (virtual) desktops on a physical Desktop

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 2.3k Views 3 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.
  • maweloM Offline
    maweloM Offline
    mawelo
    wrote on last edited by
    #1

    Hello !

    I am using QList<QScreen*> sl = QGuiApplication::screens() to get all physical Desktops. But how can I access the virtual ones ?

    Best Regards,
    Martin

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wlof
      wrote on last edited by
      #2

      Hi,

      Virtual desktops are platform / window manager dependent, so I don't think Qt offers any way to access them.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mcosta
        wrote on last edited by
        #3

        Hi,

        you can use QDesktopWidget to access to all your screens; but if you use a virtual desktop you get always the same widget

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        1 Reply Last reply
        0
        • maweloM Offline
          maweloM Offline
          mawelo
          wrote on last edited by
          #4

          @mcosta said:

          QDesktopWidget

          Yes, but this will give me the current "root" Window. I need to access all the other screens too.

          @wlof

          Virtual desktops are platform / window manager dependent

          Okay, thats what I already thought too that this is a window manager thing :(

          Best Regards, Martin

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Did you check the screen count returned by QDesktopWidget ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            maweloM 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              Did you check the screen count returned by QDesktopWidget ?

              maweloM Offline
              maweloM Offline
              mawelo
              wrote on last edited by
              #6

              @SGaist yes :-) It's says 2 if I attach a second Monitor. So thats the way I checked that this function may only count physical displays.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Sorry, I've thought you wanted to know the number of screens of the current desktop. As already stated the virtual desktop handling itself is not part of Qt. It something that is highly platform / desktop env dependent. I'm not even sure Windows currently has anything like that. What environment are you currently targeting ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                maweloM 1 Reply Last reply
                0
                • SGaistS SGaist

                  Sorry, I've thought you wanted to know the number of screens of the current desktop. As already stated the virtual desktop handling itself is not part of Qt. It something that is highly platform / desktop env dependent. I'm not even sure Windows currently has anything like that. What environment are you currently targeting ?

                  maweloM Offline
                  maweloM Offline
                  mawelo
                  wrote on last edited by
                  #8

                  @SGaist I use Systemversion: OS X 10.9.5 (13F1077) Kernel-Version: Darwin 13.4.0

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    What would you need from the Space API ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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