[Interest] Emitting signals from a different class

Marian Beermann public at enkore.de
Tue Aug 14 16:46:53 CEST 2018


Typically the semantics of signals are "something changed about *this*
object". With those semantics it should generally be the object doing
the emitting.

There are of course other ways to use signals, e.g. as a makeshift
message-bus-ish system or to call a method in another slot (though
QMetaObject::invokeMethod() is a more direct way of accomplishing that).

On 14.08.2018 16:43, Christopher Probst wrote:
> Good Morning Fellow Qters,
> 
> This is basic question. I have always had the reflex of not emitting
> signals that belong to a separate class, even if signals are public. I,
> however don't know why I adopted this rule of thumb. Why do we very
> rarely emit signals from a different QObject?
> 
> Thanks,
> Christopher  
> 
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 




More information about the Interest mailing list