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

On Mac OS X 10.5.8, Drawer widget in a MainWindow disappears after returning from full screen mode.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.5.0
    • None
    • None
    • Mac OS X 10.5.8
    • macOS
    • 725d8e061ededee9a5ddf0914aabd0f6aa2ee741

    Description

      Consider this code:

      // QT4 Includes
      #include <QApplication>
      #include <QWidget>
      #include <QMainWindow>
      #include <QPushButton>
      #include <QHBoxLayout>
      
      int main(int argc, char **argv)
      {
          // Handle command line parameters for GUI
          QApplication app(argc, argv);
      
          QMainWindow * myWindow = new QMainWindow();
          QWidget * center = new QWidget();
          myWindow -> setCentralWidget(center);
      
          QHBoxLayout * h = new QHBoxLayout();
          center -> setLayout(h);
      
          QWidget * drawer = new QWidget(myWindow, Qt::Drawer);
          drawer -> hide();
      
          QPushButton * show = new QPushButton("Show Drawer");
          app.connect (show, SIGNAL(clicked()),
              drawer, SLOT(show()));
          h -> addWidget(show);
      
          QPushButton * hide = new QPushButton("Hide Drawer");
          app.connect (hide, SIGNAL(clicked()),
              drawer, SLOT(hide()));
          h -> addWidget(hide);
      
          myWindow -> show();
          myWindow -> raise();
      
          if (0)
          {
              myWindow -> setWindowState(Qt::WindowFullScreen);
              myWindow -> setWindowState(Qt::WindowNoState);
          }
          
          app.exec();
      }
      

      Be on Mac OS X. Compile it. Run it. Two buttons, one shows the drawer, one hides it. Right? That's okay.
      Now replace the "if (0)" with "if(1)" or something similar. Recompile, rerun. The QMainWindow goes full screen, then back to normal. Click on the buttons. Note that there is no drawer anymore. It's completely gone.

      Attachments

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

        Activity

          People

            cduclos Carlos Duclos (Inactive)
            shimaron Shimaron Greywolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes