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

1

6

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?

Leora answered 11/1, 2010 at 8:24 Comment(0)
A
12

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()));
Angeles answered 11/1, 2010 at 8:37 Comment(1)
This sounds just like what I wanted! I'll try it.Leora

© 2022 - 2024 — McMap. All rights reserved.