Logo Search packages:      
Sourcecode: madman version File versions  Download package

void TrayIcon::mouseReleaseEvent ( QMouseEvent *  e  )  [protected, virtual]

This event handler can be reimplemented in a subclass to receive mouse release events for the system tray entry.

The default implementations opens the context menu when the entry has been clicked with the right mouse button.

See also:
setPopup(), mousePressEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), QMouseEvent

Definition at line 196 of file trayicon.cpp.

Referenced by event().

{
    switch (e->button()) {
    case RightButton:
      if (pop) {
          // Necessary to make keyboard focus
          // and menu closing work on Windows.
#ifdef Q_WS_WIN
          pop->setActiveWindow();
#endif
          pop->popup(e->globalPos());
#ifdef Q_WS_WIN
          pop->setActiveWindow();
#endif
          e->accept();
      }
      break;
    case LeftButton:
    case MidButton:
      emit clicked(e->globalPos(), e->button());
      break;
    default:
      break;
    }
    e->ignore();
}


Generated by  Doxygen 1.6.0   Back to index