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. Working with Virtual Desktops for Linux?
Qt 6.11 is out! See what's new in the release blog

Working with Virtual Desktops for Linux?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.1k Views 1 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.
  • P Offline
    P Offline
    prabel
    wrote on last edited by
    #1

    I am working on CentOS6, which has a dynamic number of virtual desktops available.

    1. Is there a way to query which virtual desktop(s) are currently active?
    2. Is there a way to query which virtual desktop a widget currently resides on?
    3. Is there a way to move a widget from one virtual desktop to another?
    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please check out the QDesktopWidget class: "link":http://doc.qt.io/qt-5/qdesktopwidget.html and QScreen: "link":http://doc.qt.io/qt-5/qscreen.html.

      (Z(:^

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prabel
        wrote on last edited by
        #3

        Thanks sierdzio, but I have already taken a look at the documentation for those classes. Perhaps I am missing something, but when I get a QDesktop widget and query the screenCount, it returns 2.

        I presently have 4 "desktops" with dual monitors. I would expect the result then to be 8, not 2.

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

          Hi and welcome to devnet,

          Unless I'm mistaken, QDesktopWidget encapsulate the concept of "on screen desktop" be it multi screen or a large virtual two screen spanning desktop. It doesn't know about the virtual desktop you can create through your desktop environment (e.g. KDE, Gnome etc.)

          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
          • P Offline
            P Offline
            prabel
            wrote on last edited by
            #5

            Hello SGaist, thanks for the response.

            So you're saying that there isn't a means to detect a Qt window on a desktop that is not currently being displayed and move it to another desktop?

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

              AFAIK, no, it's more something that should be handled by your window manager

              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