Note: The qt-interest archive has moved to http://lists.trolltech.com/qt-interest/, and qt-interest.trolltech.com is no longer updated with new content. Please use that link instead.
Here are all the messages with subject "my child widget =?ISO-8859-1?Q?don=B4t?= receive all Events ", and all replies to such messages. Note that some of the links in the text may perhaps not work any more when you read this.I have written a few classes to add Spaceball support for Qt. So I derive my own QSPWApplication class and overwrite the x11EventFilter() function. Furthermore I derive QSPWMotionEvent and QSPWButtonEvent classes from QEvent (type 1001 and 1002). Everytime I receive a Spaceball-Event in x11EventFilter, I construct the QSPW...Event and post the event to the widget w = QWidget::find( (WId)(event->xany.window) ); I derive a QSPWWidget class and overwrite the event(QEvent*) function, to catch the Spaceball-Events. This works fine if my QSPWWidget is a top-level widget, but if I have a parent-widget, the QSPWWidget don´t receive the SPW-event., but mouse and key events are received. Why ? Second Question: Is the construct postEvent(widget,new QSPWMotionEvent(getSPWMotionData())); in QSPWApplication::x11EventFilter correct? Will the QSPW..Event object be destroyed automatically or have I to destroy the event-object by myself. Thanks, Jan For Spaceball look at: http://www.spacetec.com/product/3d_motion_control/prod.htm
Thanks, Jan Hi, I have written a few classes to add Spaceball support for Qt. So I derive my own QSPWApplication class and overwrite the x11EventFilter() function. Furthermore I derive QSPWMotionEvent and QSPWButtonEvent classes from QEvent (type 1001 and 1002). Everytime I receive a Spaceball-Event in x11EventFilter, I construct the QSPW...Event and post the event to the widget w = QWidget::find( (WId)(event->xany.window) ); I derive a QSPWWidget class and overwrite the event(QEvent*) function, to catch the Spaceball-Events. This works fine if my QSPWWidget is a top-level widget, but if I have a parent-widget, the QSPWWidget don´t receive the SPW-event., but mouse and key events are received. Why ? Thanks, Jan For Spaceball look at: http://www.spacetec.com/product/3d_motion_control/prod.htm
So you post events but your overloaded QSPWWidget::event() method is never called. > Why ? Maybe one reason could be your widget doesn't have focus? Using a debugger should give you a definitive answer :)