Signal to signal
Signal to signal
Does CopperSpice support signal to signal?
Re: Signal to signal
Yes, you can call connect() and have the signal and slot both refer to a signal.
This syntax is not valid:
You can use this syntax:
However we strongly suggest using method pointers:
This syntax is not valid:
Code: Select all
connect( sender, SIGNAL(someSignal()), this, SIGNAL(mySignal()) );
Code: Select all
connect( sender, SIGNAL(someSignal()), this, SLOT(mySignal()) );
Code: Select all
connect( sender, &SenderClass::someSignal, this, &MyClass:: mySignal );
Re: Signal to signal
When across threads are they queued automatically like in Qt?
Re: Signal to signal
If I understand your question correctly, you are asking about the behavior when the sender and receiver belong to different threads. We can not confirm that this actually works in Qt, as we observed some undefined behavior in the signal/slot delivery system.
In CopperSpice, if you look at the different overloads for connect() in the QObject class, you will see that the default for the connection type is Qt::AutoConnection. An AutoConnection will automatically queue signals if the sender and receiver are in different threads.
https://www.copperspice.com/docs/cs_api/class_qobject.html
Let us know if you have more questions about connections.
Ansel Sermersheim
CopperSpice Cofounder
CopperSpice Cofounder
Re: Signal to signal
Cool. Sounds good. Thanks for the info.
Thanks for CopperSpice. I think many people might change now since Qt is going so commercial and very expensive.
Thanks for CopperSpice. I think many people might change now since Qt is going so commercial and very expensive.