Fix bug can not show normal window icon in taskbar when show a config window

This commit is contained in:
chenlelin 2020-09-24 16:53:57 +08:00
parent fda20445fb
commit 0f56da01c5
3 changed files with 4 additions and 0 deletions

View File

@ -38,7 +38,9 @@ ConfForm::ConfForm(QWidget *parent) :
this->setWindowFlags(Qt::FramelessWindowHint); //Qt::WindowStaysOnTopHint
this->setWindowTitle(tr("edit network"));//"网络设置"
this->setAttribute(Qt::WA_TranslucentBackground);
this->setWindowIcon(QIcon::fromTheme("kylin-network", QIcon(":/res/x/setup.png")) );
//需要添加 void paintEvent(QPaintEvent *event) 函数
//this->setWindowIcon(QIcon::fromTheme("indicator-china-weather", QIcon(":/res/x/setup.png")) );
QPainterPath path;
auto rect = this->rect();

View File

@ -38,6 +38,7 @@ DlgConnHidWifi::DlgConnHidWifi(int type, MainWindow *mainWindow, QWidget *parent
this->setWindowFlags(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground);
this->setWindowIcon(QIcon::fromTheme("kylin-network", QIcon(":/res/x/setup.png")) );
//需要添加 void paintEvent(QPaintEvent *event) 函数
QPainterPath path;

View File

@ -37,6 +37,7 @@ DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget *
this->setWindowFlags(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground);
this->setWindowIcon(QIcon::fromTheme("kylin-network", QIcon(":/res/x/setup.png")) );
//需要添加 void paintEvent(QPaintEvent *event) 函数
QPainterPath path;