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. QScreen with different graphics cards || QScreen and Xinerama?
Qt 6.11 is out! See what's new in the release blog

QScreen with different graphics cards || QScreen and Xinerama?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.0k 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.
  • S Offline
    S Offline
    Seraph
    wrote on last edited by
    #1

    Hi there,

    I just have the following problem:

    I have a machine with two nvidia cards and running a Xubuntu (11.10).
    Now what i am trying to do is spawn a window on my extended screen which is connected to the secondary graphics card.
    QGuiApplication::screens().size() returns 2 for my two screens which is correct so far. My secondary graphics card is running in a seperate X server (which is the usual way to do that i guess). But if i create my window as follows
    QWindow w(QGuiApplication::screens()->at(1)); w->show();
    The whole application crashes without any message! (is that normal?)

    Now i am using Xinerama to have it more "Windows like". But now QGuiApplication::screens()->size() returns 1, which is not correct in my oppinion. Is there another way to have access to the QScreen which represents the screen connected to my second graphics card?

    I also tried the virtualSiblings thing of QScreen but there is only one instance and it is the same as my primary screen!

    HELP?

    Thanks

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vngthowhing
      wrote on last edited by
      #2

      I'm having the same problems with you as well.
      Under Qt5.3, in Xinerama mode, QGuiApplication::screens() only returns the single screen which is the union of all available screens. QScreen::geometry returns the union of all screen geometries.

      Under Qt 4.8, these calls worked as desired. However, I think with the major reimplementation in Qt5.3, things have changed.

      When I disable Xinerama, I can get the correct number of screens and geometry, but every time I try to open a QWindow set to another screen other than the primary, the window only pops up on the primary screen.
      I think it might have to do with that all my screens are running their own X servers and hence X displays.

      Any help on this would be appreciated as well.
      I can't open any windows other than on the primary screen with Xinerama disabled on my Ubuntu 12.04 workstation.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andreyc
        wrote on last edited by
        #3

        Take a look on "QDesktopWidget":http://qt-project.org/doc/qt-5/QDesktopWidget.html#details

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vngthowhing
          wrote on last edited by
          #4

          QDesktopWidget will only return the one screen in Xinerama mode.
          Under Qt 4.8, it used to return all the screens, but with Qt 5.3, it just returns a single screen. I'm hoping that calling virtualSiblings will give me access. Will try it out tomorrow.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vngthowhing
            wrote on last edited by
            #5

            Looks like in Xinerama mode, calling virtualSiblings on the single QScreen returned from QApplication::screens() also only returns a single QScreen instead of the multiple screens that make up the large virtual screen.

            It also appears that QDesktopWidget::isVirtualDesktop() also incorrectly returns false instead of true.

            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