I'm porting a Qt 4.8.x program to Qt 5.3. It works fine under Qt 4.8 when my Ubuntu 12.04 X11 server is running Xinerama mode with Nvidia hardware.
I previously used QtDesktopWidget to retrieve multiple screens and their geometry (I have five connected displays). Under Qt 5.3 in Xinerama mode, QDesktopWidget::screenCount() only returns 1 screen, which is the union of all five. Under Qt 4.8, it would properly return the 5 screens with their correct geometry.
I next tried running my X server with Xinerama disabled with Qt 5.3. Now, I can correctly get the right screenCount with QDesktopWidget and QApplication:screens() returns a proper list of Screen * I can access.
However, whenever I try to open a window in one of these screens, using QWindow::setScreen, the window always opens up in the primary screen, no matter which screen I set in the constructor of QWindow or using QWindow::setScreen.
When I try open my Qt application in the other screen using X11 arguments like: myapp --display :0.2, this works fine.
However, I need to do this programmatically as I have different content for each display. Has anyone succeed in opening windows in other screens with Qt5 either with or without Xinerama mode turned on? I would prefer not to use Xinerama at QDesktopWidget seems to be built on libxcb only.
Regards, Victor