MDI sub window's event handling?
I have a widget inherited from QGLWidget which is added to MDI area with addSubWindow().
I implemented my widget's keyPressEvent(), making it output a line of text every time it is called.
But it seems not working -- I guess the key press event is captured by QMdiSubWindow, but not sure.
Well, for you desperate guys who found this page with google...
- write a class P which inherites QMdiSubWindow;
- reimplement QMdiSubWindow::*Event();
- use QMdiSubWindow::setWidget(QWidget *);
- call QMdiArea::addSubWindow(p). [here p is the instance of your class P]