We have an application that opens two windows. We want them to open on two different X screens. We don't use Twinview or xinerama. The gfxcard is Nvidia. The code we use is:

Qt Code:
  1. ourWindow->setGeometry(QApplication::desktop()->availableGeometry(1));
To copy to clipboard, switch view to plain text mode 

But when we check the screen number afterwards:

Qt Code:
  1. cout << "Screennumber: " << QApplication::desktop()->screenNumber(ourWindow.get()) << endl;
To copy to clipboard, switch view to plain text mode 

It gives us screennumber 0. All the screens also opens on the same desktop. Is something buggy or are we doing it wrong?

Qt Code:
  1. cout << "Number of screens: " << QApplication::desktop()->numScreens() << endl;
To copy to clipboard, switch view to plain text mode 

gives us Number of screens: 2, so Qt see our two screens.

/regards
Erik