[Interest] About event filter on QApplication
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...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Interest