How to propagate keyPressEvent on different qt QMainWindow
问题 I have 2 different QMainWindow, the first is the parent of the second. I want press some keys in the children windows and propagate the event in the parent. I create for everyone the function void keyPressEvent(QKeyEvent* event); but when i press key on the children the event is not propagate to the parent. Why? This is the code... //Parent class.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QKeyEvent> #include "test.h" #include <QDebug> namespace Ui { class