fix: cannot minimize window by clicking taskbar icon

This commit is contained in:
Gary Wang 2020-08-04 19:10:02 +08:00
parent 90d0869b5e
commit 1cb67b48f4

View File

@ -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);