Skip to content

Commit fbf5fbd

Browse files
committed
[fix] mainwindow: fix closing when window is minimized
1 parent a0e8991 commit fbf5fbd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/mainwindow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
6060
QAction *restore = trayMenu->addAction(tr("Restore"));
6161
connect(restore, &QAction::triggered, this, &MainWindow::showNormal);
6262
QAction *close = trayMenu->addAction(tr("Close"));
63+
connect(close, &QAction::triggered, this, &MainWindow::showNormal); // Needed for close to work when window is hidden
6364
connect(close, &QAction::triggered, this, &MainWindow::close);
6465
connect(trayIcon, &QSystemTrayIcon::activated, this, [this](QSystemTrayIcon::ActivationReason reason) {
6566
switch (reason) {

0 commit comments

Comments
 (0)