window always stay on top

This commit is contained in:
Gary Wang 2019-10-02 22:16:20 +08:00
parent f47ee03ce3
commit 31add38e48

View File

@ -19,7 +19,7 @@
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent) QMainWindow(parent)
{ {
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint); this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
this->setAttribute(Qt::WA_TranslucentBackground, true); this->setAttribute(Qt::WA_TranslucentBackground, true);
this->setMinimumSize(710, 530); this->setMinimumSize(710, 530);
this->setWindowIcon(QIcon(":/icons/app-icon.svg")); this->setWindowIcon(QIcon(":/icons/app-icon.svg"));