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

Window minimizing broken after building QT app with Mac OS High Sierra SDK

    XMLWordPrintable

Details

    • macOS
    • 556fbbea6e96c07c6cbd552c4179e5717e799acf (qt/qtbase/dev) 069d5097189d905d016ce0717b1c7cec69d3cf27 (qt/qtbase/5.12) cf279b1328adac82b0404cfb5504986f0fcf69dc (qt/qtbase/6.2) 68b107f2b861e3583c0d236b0eea6ab2dd1e4f68 (qt/qtbase/6.1)

    Description

      I have a frameless Qt app setup with setWindowFlags (Qt::Window | Qt::FramelessWindowHint) and custom minimize and close buttons. I'm having trouble minimizing the app by using setWindowState(Qt::WindowState::WindowMinimized) or showMinimized() and the 10.13 SDK. It worked fine on Mac with the 10.12 SDK. I also tested this with a new clean project with no special eventFilters or similar. Anyone else with this problem? I'm using Qt 5.10.0, this problem also appeared in Qt 5.9.1.

      I'm just doing this in my MainWindow which works with the 10.12 SDK.

      MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
          //remove native OS-titlebar
          setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
          
          QPushButton* minimizeButton = new QPushButton();
          minimizeButton->setText(QLatin1String("Minimize"));
          connect(minimizeButton, &QPushButton::clicked, this, &QMainWindow::showMinimized);
          
          QPushButton* quitButton = new QPushButton();
          quitButton->setText(QLatin1String("Close"));
          connect(quitButton, &QPushButton::clicked, this, &QMainWindow::close);
          
          QHBoxLayout* layout = new QHBoxLayout();
          layout->addWidget(minimizeButton);
          layout->addWidget(quitButton);
          
          QWidget *centralWidget = new QWidget();
          centralWidget->setLayout(layout);
          setCentralWidget(centralWidget);
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              knappsas Sascha Knapp
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              7 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: