PDA

View Full Version : QDialog and QMainwindow focus and key events problem



Charvi
24th September 2015, 07:09
Hi,

I have an application with widgets of following hierarchy:

QMainwindow -> QWidget (custom) -> QDialog (custom)

Now whenever I pressed Ok in QDialog the focus never went back to QMainwindow so, I made QMaindwindow as the parent of QDialog.
Now after clicking Ok on the Qdialog, I get some of the key press events in QMainwindow like Esc, CTRL, SHIFT, ENTER, etc. but I do not get other key events like Delete.

I have no clue what can cause this, does anyone here have one ?

Thanks,
Charvi