EventFilter Print Screen key?
Hey all so I've setup a simple eventfilter to run a few tests on capturing keyboard input to build a QKeySequence, here it what I have setup
@test::test(QWidget *parent) : QWidget(parent), ui(new Ui::Options)
bool test::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::KeyPress)
QKeyEvent keyEvent = static_cast<QKeyEvent>(event);
qDebug() << "key int: " << keyEvent->key(); } return QWidget::eventFilter(obj, event);
Now this works great for almost all keys however nothing happens when I press the "Print Screen" key on my keyboard why is this? as this is one of the keys I would really like to grab.
Problem not in you - problem is in OS'es. They are not allowing to catch PrintScreen key press event.
But there are a few solutions specified for systems' API's