Answer the question
In order to leave comments, you need to log in
How to connect a slot to a signal in another thread?
Hello
There are 2 streams - the main and the second. The second one has a slot slotDataChanged()
that I'm trying to connect to a signal QClipboard::dataChanged()
, it doesn't come out. I understand that it is impossible to take the objects created there from the main thread and connect them in a completely different thread
. In the main thread, you can’t connect for this reason: you will need to disconnect objects in another thread. Please tell me the solution to my problem
Answer the question
In order to leave comments, you need to log in
Strictly speaking, when using connect , it should not matter to you at all which thread the object lives in - this is why the last default parameter is needed - Qt::AutoConnection .
What does it mean by "doesn't work"?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question