i tried like the below and it did not worked. how to use the modifier inside keypressevent.

Qt Code:
  1. void GLWidget::keyPressEvent(QKeyEvent * event) {
  2. switch (event->key()) {
  3. case (Qt::Key_1):
  4. if (event->modifiers()==Qt::ShiftModifier)
  5. qDebug()<<"shift and one";
  6. break;
  7. }
  8. }
To copy to clipboard, switch view to plain text mode