[Qt-interest] Forcing a signal "emit" to be queued
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Mon Mar 21 12:54:36 CET 2011
> No, actually that will allow you to do this without using a private signal
> at all. You can invoke a signal using invokeMethod() with a queued
> connection, or you can use the single shot timer connected to your public
> signal. Both methods would rid you of the private signal, and hence of the
> private class (if you did not need this for other purposes anyway).
Oh yes, I forgot that I could give a signal name to invokeMethod()
too. Though the only 'technical' limitation here is the number of args
that one can pass to invokeMethod (max is 10). Though it might not be
much of an issue in most cases.
As for the singleShot approach, will it have an overhead of creating a
OS specific timer underneath (even for a timeout of 0)? Not sure how
heavy creation/destruction of such timer is.
Thanks again for all your ideas.
Regards,
-mandeep
>
> André
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list