应用桌面托盘提示框信息

#include <QSystemTrayIcon>

QSystemTrayIcon    *m_mTray;
m_mTray = new QSystemTrayIcon(this);    //声明对象
m_mTray->setToolTip(windowTitle());    //设置提示信息
m_mTray->setIcon(QIcon(SKIN_PIX_PATH(RSC_ICON_TITLEICON)));//设置提示框内嵌图标

connect(m_mTray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
m_mTray->showMessage(MAKE_STRING(Gui_ERR_MSG_Title), MAKE_STRING(MSG_MKV_CONVER_TRIAL_WARNING), QSystemTrayIcon::Information, 3000);

//参数1:提示框标题; 参数2:提示框内嵌提示信息; 参数3:无图标/警告/提示等小图标(感叹号/问号); 参数4:提示框显示停留时间(3000=3秒)
m_mTray->show();

 

posted @ 2014-11-12 22:01  sz_leez  阅读(457)  评论(0编辑  收藏  举报