Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show dialog/frame fullscreen on a second screen sing QT/c++

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?

like image 508
fmuecke Avatar asked Jan 11 '10 08:01

fmuecke


1 Answers

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()));
like image 97
Georg Fritzsche Avatar answered Nov 17 '22 13:11

Georg Fritzsche