I am new to Qt and trying to implement what should be a pretty straightforward "key pressed" event method, but it doesn't seem to be registering properly.
Here is the declaration in my header file:
#include <Qt>
#include <QKeyEvent>
class MainWindow : public QMainWindow
{
Q_OBJECT
protected:
void KeyPressEvent(QKeyEvent* event);
};
and here is the implementation:
void MainWindow::KeyPressEvent(QKeyEvent *event)
{
qDebug() << "Registered Key Press";
}
This is almost exactly what the examples I have seen online look like, so unless there is some connection somewhere I am missing, not sure what the issue would be.