コード例 #1
0
ファイル: tst_qsystemtrayicon.cpp プロジェクト: husninazer/qt
// Testing get/set functions
void tst_QSystemTrayIcon::showHide()
{
    QSystemTrayIcon icon;
    icon.setIcon(QIcon("icons/icon.png"));
    icon.show();
    icon.setIcon(QIcon("icons/icon.png"));
    icon.hide();
}
コード例 #2
0
/**
 * @brief Send a popup through Growl.
 * @param icon The icon inside the notification. Currently ignored.
 * @param timeout The time in ms to show the notification.
 * @param title The title displayed inside the notification.
 * @param message The message displayed inside the notification.
 */
void NotifyByPopupGrowl::popup( const QPixmap *icon, int timeout,
                                const QString &title, const QString &message )
{
  Q_UNUSED( icon );

  QSystemTrayIcon i;
  i.show();
  i.showMessage( title, message,
                 QSystemTrayIcon::Information, timeout );
  i.hide();
}