Signals and slots are used for communication between objects. The signals and slots mechanism is a central feature of Qt and probably the part that differs most from the features provided. Since QRect and QImage objects can be serialized for transmission via the signals and slots mechanism, they can be sent between threads in this way, making it convenient to use threads in a wide range of situations where built-in types are used. Running the Example. We only need one more piece of code to complete the example.
- Signals And Slots Between Threads Online
- Signals And Slots Between Threads Chart
- Signals And Slots Between Threads And Accessories
- C++ Thread Signal
Hello all !
I have some difficulties to find an appropriate way to solve a problem of communication between objects in differents threads (although I already read the Signals/slots accross threads). Here is my problem:

I have an object a of class A living in a thread T1.
I have an object b of class B living in a thread T2.
Signals And Slots Between Threads Online
Both objects a and b can emit signals and have slots to manage the signals emitted by the object living in the other thread (Object a has slots to manage signals from object b, and object b have slots to manage signals from object a).
Once I have moved the object to their respective threads, I connect the signals/slots using Qt::connect(..., Qt::QueuedConnection), but once the signals is emitted, the slot is never executed.
I don't use Qt::DirectConnection (because it's quite the same that invoking directly the method, and I don't want this), and I would like to avoid to manage an event dispatcher or an event loop in the parent thread.
Does someone know how to use correctly the Qt threads in order to make the communication between signals/slots between objects living in different threads (none living in the main thread) ?
Thank you a lot for your answers !
Hello all !
I have some difficulties to find an appropriate way to solve a problem of communication between objects in differents threads (although I already read the Signals/slots accross threads). Here is my problem:
Signals And Slots Between Threads Chart
I have an object a of class A living in a thread T1.
I have an object b of class B living in a thread T2.
Both objects a and b can emit signals and have slots to manage the signals emitted by the object living in the other thread (Object a has slots to manage signals from object b, and object b have slots to manage signals from object a).
Once I have moved the object to their respective threads, I connect the signals/slots using Qt::connect(..., Qt::QueuedConnection), but once the signals is emitted, the slot is never executed.
I don't use Qt::DirectConnection (because it's quite the same that invoking directly the method, and I don't want this), and I would like to avoid to manage an event dispatcher or an event loop in the parent thread.
Signals And Slots Between Threads And Accessories
Does someone know how to use correctly the Qt threads in order to make the communication between signals/slots between objects living in different threads (none living in the main thread) ?
C++ Thread Signal
Thank you a lot for your answers !