views:

472

answers:

1

I have an application with a secondary view that should be shown fullscreen on the other monitor (the one the main app is not on).

Displaying the frame works quite well with frame.showFullScreen();

But, how can I tell it which screen it should be on? Is there a way to detect if a second screen is avauilable, as well?

+4  A: 

You can retrieve screen information from QDesktopWidget. To move a window to a specific screen, you can do something like this:

QRect screenres = QApplication::desktop()->screenGeometry(screenNumber);
widget->move(QPoint(screenres.x(), screenres.y()));
Georg Fritzsche
This sounds just like what I wanted! I'll try it.
fmuecke