Hi, tell me please is it bug or maybe I doing something wrong... ?

Qt Code:
  1. void mousePressEvent(QMouseEvent * event)
  2. {
  3. if(event->button() == Qt::LeftButton){
  4. qDebug() << "left"; //not working
  5. }else if (event->button() == Qt::RightButton){
  6. qDebug() << "right"; //working
  7. }
  8. event->ignore();
  9. }
To copy to clipboard, switch view to plain text mode