如题,为程序设置了一个系统托盘。使用它的showMessage方法来弹出气泡消息。
根据文档:
void QSystemTrayIcon::showMessage ( const QString & title, const QString & message, MessageIcon icon = Information, int millisecondsTimeoutHint = 10000 )
最后一个参数指定了气泡消息的弹出时间。但是现在我的消息会一直保持,不会自己消失。
文档里有一句话:
On Windows, the millisecondsTimeoutHint is usually ignored by the system when the application has focus.
我想是遇到这个问题了。但是怎样才能让程序失去焦点呢?比如说我现在在浏览器里,但是气泡消息弹出来了还是不会自动的消失。。。。。。