[Interest] How can I use Qt5 in my own mainloop?

POIRIER Mathieu mathieu.poirier at enac.fr
Tue Sep 30 11:39:26 CEST 2014


Thanks but this is much complex than that. 
And for research purpose, I need my main loop.
Also Qt5 is not my only backend.

If i understood correctly, Qt is base on a GTK+2 main loop and I'm using a fork of the Tcl/tk main loop.

I have try to add a Native filter on my QApp and dispatch them to my main loop.
but the Native Filter is always empty. I think it's because of the signal (emi EventPending()) on QXcbEventReader::run uses a Qt::QueuedConnection so it waits for to be back in Qt main loop to be processed

POIRIER Mathieu
Research Engineer CHI / IHM
Bât. Caudron - C105
Laboratoire d'Informatique Interactive SINA/LII - ENAC
7 av. Edouard Belin - 31055 Toulouse
email : mathieu.poirier at enac.fr
tel   : +33 5 6217 4150 



Le 29 sept. 2014 à 18:13, interest-bounces+mathieu.poirier=enac.fr at qt-project.org a écrit :

> On Monday 29 September 2014 10:52:00 POIRIER Mathieu wrote:
>> How can i do this in Qt5 ?
>> 
>> because it seems that QXcbEventReader opens a connection on the same X11
>> socket (IN another thread) AND eats every xevents sent, starving my
>> connection which receives nothing anymore, and to send them back to it-self
>> as PostedEvents !
> 
> Don't do you own event loop. Instead, ask Qt for filtering the native events.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140930/862254aa/attachment.html>


More information about the Interest mailing list