Fix bug tray bar in task bar flash when launch another kylin-nm appication

This commit is contained in:
chenlelin 2021-03-02 17:55:47 +08:00
parent 226a7320ac
commit 3bc84ffcaf
3 changed files with 10 additions and 1 deletions

View File

@ -72,5 +72,7 @@ int main(int argc, char *argv[])
return 0;
}
w.justShowTrayIcon();
return a.exec();
}

View File

@ -79,7 +79,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(mShowWindow,SIGNAL(triggered()),this,SLOT(on_showWindowAction()));
connect(mAdvConf, &QAction::triggered, this, &MainWindow::actionTriggerSlots);
checkSingleAndShowTrayicon();
//checkSingleAndShowTrayicon();
//trayIcon->setVisible(true);
objKyDBus = new KylinDBus(this);
@ -163,6 +163,11 @@ void MainWindow::checkSingleAndShowTrayicon()
}
}
void MainWindow::justShowTrayIcon()
{
trayIcon->setVisible(true);
}
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
{
if (obj == ui->btnNetList) {

View File

@ -124,6 +124,8 @@ public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void justShowTrayIcon();
void editQssString();
void createTopLanUI();
void createTopWifiUI();