QT窗口最小化后,不显示任务栏图标

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/rongyong/article/details/48787479
void pxeclient::changeEvent(QEvent * event )
{
if(event->type()==QEvent::WindowStateChange)
{  
if(windowState() & Qt::WindowMinimized)
{  
hide();  
m_sysTrayIcon->show();//显示托盘
m_sysTrayIcon->showMessage(windowTitle(),"Here is program,click will show!", QSystemTrayIcon::Information, 10000);//提示
}  
QMainWindow::changeEvent(event);  
}
}

展开阅读全文

没有更多推荐了,返回首页