QT 5.0 fullscreen mode behavior changed in Windows 7?
In a dual-screen configuration switching a window into fullscreen mode did not change the screen in all versions up to 4.8.4. In Qt 5, however, this is no longer true. Instead the window alway uses the main screen (screen 0). Is this intended behavior or just a bug?
I really need the old behaviour and would appreciate if someone knows a way to influence the target screen for fullscreen mode.
you can change the window to a different screen, but i have no idea ( geometry doesn't work ) how to use both screens.
Here an example to use the last screen:
@ QList<QScreen *> screenList = app.screens();
Thanks for the response. Unfortunately it did not work. I assumed from your example that setScreen() is a member of QWidget, but this is not the case. What type is the variable "viewer" you use in your snippet? Has you ever sucessfully used this method in Qt 5?
Viewer is the QML-Viewer created by the QTCreator 2.6.1 when you begin a new QML2 Application
Thanks again! The method setScreen() is a member of QWindows but not of QWidget. However, there is a member QWidget::windowHandle() that returns the pointer to the actual QWindow (although marked as "preliminary" in the documentation).
where ex is a pointer to a QWidget, does the trick.
Hi, does any one found a real solution for a QWidget based application?
This isin't working at all on my system.
QWidget::windowHandle() returns a constant. When casting and passing the second Screen to setScreen, everything just disappears.
The above mentioned method works at least on Windows7, that is, on my dual-monitor system
@QWidget *ex = <assign a pointer to an existing QWidget object>;
QList<QScreen *> screenList = app.screens();
opens a window on the second screen. Please note that QWidget::windowHandle() returns a pointer to QWindow, not a constant.
levelxxl you shouldn't call the windowHandle method from the QWidget namespace. You should call it on your applications widget :)