From 1cb67b48f4d06034b62c79a22d365b3e8ce5b23c Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 4 Aug 2020 19:10:02 +0800 Subject: [PATCH] fix: cannot minimize window by clicking taskbar icon --- mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index de25c98..e7597b4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -30,9 +30,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { if (Settings::instance()->stayOnTop()) { - this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); + this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowStaysOnTopHint); } else { - this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint); + this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint); } this->setAttribute(Qt::WA_TranslucentBackground, true);