I have a MainWindow
with a QLabel
for visualize some QPixmap
. I have subclassed the QLabel class in, let's say, MyVisualizer, for handling the QPixmap generation/modification/whatever.
Now in the MainWindow, with a key pressed I want the QLabel to fullscreen, and due to the showFullScreen
method works only on windows, I have created a QDialog
, moved the myvisualizer instance inside of it, and called QDialog::showFullScreen
.Then, I'd like to have another key-pressed listener in the QDialog for some other actions.
Is it possible to add a keyPressEvent(QKeyEvent *e)
callback to QDialog without subclassing it?