[Qt-interest] How to use Windows Message System in Qt/Win Application?

Carsten Breuer CarstenBreuerQt at textwork.de
Fri Jun 18 23:08:19 CEST 2010


Hi Mathias,
hi all,


> Sadly I still have not seen a single real world example of its usage.
> I am trying to do this:
> QMicosPolluxController::QMicosPolluxController()
> {
>     QCoreApplication::setEventFilter(MicosEventFilter);
> }

i take a closer look to the docs and
setEventFilter is the wrong function for this purpose.

You need to create a derived class from QApplication
and then override the following virtual function:

bool winEventFilter ( MSG * msg, long * result )

The message id is in msg->msg.



Best Regards,



Carsten



More information about the Qt-interest-old mailing list