Answer the question
In order to leave comments, you need to log in
Is it true that slots in Qt are executed on their own thread?
Recently I saw such a statement that each slot in Qt is executed in its own, new, thread.
Example:
TypeClass obj1;
connect(&obj1, &TypeClass::Signal1, this, &MainClass::SomeFun1);
connect(&obj1, &TypeClass::Signal2, this, &MainClass::SomeFun2);
Answer the question
In order to leave comments, you need to log in
The slot runs on the thread in which the slot's QObject is created or moved to (if connected as a Qt::QueuedConnection).
In your case, all slots will be executed in this->thread();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question