View Full Version : Opening windows on different x screens

29th June 2009, 10:41
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:


But when we check the screen number afterwards:

cout << "Screennumber: " << QApplication::desktop()->screenNumber(ourWindow.get()) << endl;

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

cout << "Number of screens: " << QApplication::desktop()->numScreens() << endl;

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