Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46701

Closing a full screen window via Qt APIs leaves the screen black on macOS

    XMLWordPrintable

    Details

    • Platform/s:
      macOS

      Description

      The code snippet attached can be used to reproduce the issue

      #include <QApplication>
      #include <QWidget>
      #include <QTimer>
      
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          a.setQuitOnLastWindowClosed(false);
          QWidget w;
          w.showFullScreen();
          
          QTimer::singleShot(2000, [&]{
              w.close();
          });
          
          return a.exec();
      }
      

      Steps to reproduce:
      1. Build and run the example attached.
      Expected result:
      The window is closed and the dashboard changes to the "main" one

      Actual result:
      The window is closed and the dashboard is shown black, doesn't return to the "main" dashboard. (use cmd+tab to switch the dashboard).

        Attachments

        1. QTBUG-46701.patch
          1 kB
          Leo Schubert
        2. QTBUG-46701.tar.gz
          0.7 kB
          Timur Pocheptsov

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              sorvig Morten Sørvig
              Reporter:
              qtcomsupport Qt Support
              Votes:
              19 Vote for this issue
              Watchers:
              31 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes