[Interest] About event filter on QApplication

Thiago Macieira thiago.macieira at intel.com
Sun Nov 3 17:28:16 CET 2013

On domingo, 3 de novembro de 2013 15:21:09, 程梁 wrote:
> As you could see, I installed a global event filter on QApplication. Note
> that I have returned true in the filter which means all events should stop
> processing. In Qt4, the output ("QApplication::eventFilter") will still
> there but with Qt5 nothing outputs. This might because watched and
> m_watched is not the same (QWidgetWindow). But when I changed to return
> false as default code, the output is there again. Maybe in Qt5 the return
> value also changes watched objects? I cannot find any documents about this.
> Could you help me? Thank you!

Returning true for all events is a stupid idea. You're blocking ALL events, 
including those that Qt needs working in order to make your functionality 

So my conclusion is that you blocked some event that was a precursor to the 
event sent to the label.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131103/d758871a/attachment.sig>

More information about the Interest mailing list