Hi,

just call your function in the mouseReleaseEvent like this:

Qt Code:
  1. void mouseReleaseEvent(QMouseEvent *event)
  2. {
  3. if(event->button() & Qt::RightButton)
  4. {
  5. // call your specific function
  6. this->doSth();
  7. }
  8. }
To copy to clipboard, switch view to plain text mode