How to use number pad Keys in Qt?

Use keyPressEvent->modifiers().testFlag(Qt::KeypadModifier).