Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMainWindow::showFullScreen() problem on Mac OS X 10.8
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Ganster41
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • T3STYT Offline
      T3STYT Offline
      T3STY
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Ganster41
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Which version of Qt are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Ganster41
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved