QMainWindow::showFullScreen() problem on Mac OS X 10.8



  • Hello again.
    I have new problem with Qt on Mac OS. I need fullscreen window in my app, and QMainWindow::showFullScreen() works fine on osx 10.7+, but when I trying to close it, gray fullscreen frame still appears. How to close fullscreen window on osx correctly?

    Steps to reproduse:

    1. Create QMainWindow subclass as main window of app;
    2. Create window instance, then call it's showFullScreen() method to show it;
    3. Call close() method to close window.

    Thanks!



  • The documentation reports that [url=http://qt-project.org/doc/qt-5.1/qtwidgets/qwidget.html#showFullScreen]QWidget::showFullScreen()[/url] has a limitation in such functionality in non-Windows environments, due to the protocol the applications use to communicate between the X11 clients and the window manager.

    bq. (...) Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work.

    I guess this is the cause of your issues. You might want to try to put the window out of the full screen state before closing it. If that still does not solve your issue I'd suggest to use a simple maximized window instead of a full screen window.



  • It looks like bug, not limitation. Because it show window OK, but doesn't close it correctly. On Mac OS X fullscreen windows opens new virtual desktop for them. But Qt doesn't close it after closing window. Changing window to non-fulscreen state doesn't help too :(

    Maximized borderless window can't fill all screen on osx, but I need it.

    May be someone knows any platform-specifick hack, or somerthing else?


  • Lifetime Qt Champion

    Hi,

    Which version of Qt are you using ?



  • I tried 5.1.1 and 5.2. Both of it works same.


  • Lifetime Qt Champion

    Also valid for the current git version. You should open a bug report "here":http://bugreports.qt-project.org with a minimal compilable example


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.