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

Mac : Calling showFullScreen() then showNormal() on a widget results in top menu hiding.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.2
    • 4.6.1
    • None
    • None
    • macOS
    • 9d207f042ea135eda6bcd91c47d581914470fa6d

    Description

      As a workaround move the call to showFullScreen into a slot, as in the commented code in this example.

      #include <QtGui>
      
      class MainWindow : public QMainWindow
      {
         Q_OBJECT
      
      public:
         MainWindow();
      
      public slots:
         void testSlot();
         void testSlot2();
      
      private:
         QByteArray geo ;
      };
      
      
      MainWindow::MainWindow()
         : QMainWindow()
      {
      //   QTimer::singleShot(1000, this, SLOT(testSlot()));
         QTimer::singleShot(2000, this, SLOT(testSlot2()));
      }
      
      void  MainWindow::testSlot()
      {
         show();
         showFullScreen();
      };
      
      void MainWindow::testSlot2()
      {
         showNormal();
      };
      
      
      #include "main.moc"
      
      int main(int argc, char *argv[])
      {
         QApplication app(argc, argv);
      
         MainWindow mainWindow;
          mainWindow.show();
          mainWindow.showFullScreen();
      
         return app.exec();
      }
      

      Attachments

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

        Activity

          People

            cduclos Carlos Duclos (Inactive)
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes