[Development] "Native event" filter

Thiago Macieira thiago.macieira at intel.com
Fri Jun 22 10:14:22 CEST 2012


On sexta-feira, 22 de junho de 2012 10.07.54, David Faure wrote:
> QWindow and QWidget have a virtual method nativeEvent(), but this only works
> for window-specific or widget-specific event handling.
> 
> Looking at the KDE code, I see a rather wide usage of process-level handling
> of native events.
> 
> http://lxr.kde.org/ident?i=installX11EventFilter shows about 30 uses of
> that.
> >From idle detection to desktop-wide clipboard handling, color picking,
> >RANDR
> event handling, and so on.
> This was all done via QApplication::x11EventFilter(), which doesn't seem to
> have a replacement in Qt5 yet.
> 
> 1) any objections against adding this to Qt 5? (for 5.1 if you want,
> assuming it can be done without new virtual methods)
> 
> 2) what could the API look like? Ideally similar to QEvent event filters, so
> 
> QGuiApplication::installEventFilter(Receiver *) ?

I'd say the right place for this is QPlatformNativeInterface.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- 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/development/attachments/20120622/5579dff3/attachment.sig>


More information about the Development mailing list