[Qt-interest] Forcing a signal "emit" to be queued

sarvesh saran aquarian.thunder at gmail.com
Mon Mar 21 08:04:06 CET 2011


Hi,

Can you kindly explain what you mean by "using my class's signals directly?"
how does your approach force users of your class to only use queued
connections?

thanks,
Sarvesh

On Mon, Mar 21, 2011 at 12:00 PM, Mandeep Sandhu <
mandeepsandhu.chd at gmail.com> wrote:

> Hi All,
>
> Sometime back I had a requirement where I didn't want ppl using my
> class's signals to connect to them directly. Currently if you do 'emit
> mySignal()', it's upto to the class that uses this signal, to decide
> how it would like to connect to it.
>
> For forcing a queued a connection, I thought of the following approach:
>
> connect(this, SIGNAL(myInternalSignal(), this, SIGNAL(mySignal()),
> Qt::QueuedConnection);
>
> Basically I'm chaining my signal and re-emitting it with the queued
> connection type (I've yet to verify this code though).
>
> How can one verify if the slot is indeed called in a queued connection?
>
> Thanks,
> -mandeep
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110321/fab43fb8/attachment.html 


More information about the Qt-interest-old mailing list