[Qt-interest] Qt::AutoConnection fails
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Tue Apr 14 15:27:19 CEST 2009
Stefan Bisplinghoff wrote on Tuesday, April 14, 2009 1:30 PM:
> ...
> I have done some experiments with the different connection types and
> the results are, that with AutoConnection and QueuedConnection the
> slot is just not been called.
Just to rule out the obvious: you *do* have a Q(Core)Application with an event queue running in the "main" thread, right? (Or else you would not be able to react to mouse events either in your main window).
In order for queued connections to work the *receiving* thread (in your example that would be the "main" thread - but make sure your real code also behaves like this) needs to have an event queue running: http://doc.trolltech.com/4.5/qthread.html#exec
As Thiago already pointed out the time of the connect() call does *not* influence the queued vs direct call decision - that is apparently evaluated at emit time (even though my memory tells me that this used to be different - when in doubt, "use the (Qt) source, Luke!" ;)
Apart from that I don't have any ideas anymore why your slot would not be called with queued connections.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list