QObject::setParent: Cannot set parent, new parent is in a different thread
-
I want to dynamically add widgets to the UI from a separate thread but am getting this error
-
I want to dynamically add widgets to the UI from a separate thread but am getting this error
@Khamisi-Kibet
You cannot/must not. UI operations must only be done in the UI thread. Hence the error message you are getting.Maybe your other thread should be sending a signal for the UI thread to connect to, and the UI thread should create whatever widgets in response?
-
@Khamisi-Kibet
You cannot/must not. UI operations must only be done in the UI thread. Hence the error message you are getting.Maybe your other thread should be sending a signal for the UI thread to connect to, and the UI thread should create whatever widgets in response?
@JonB Thank you.
Can you please help me with an example or link on how to send a signal to the GUI thread. -
@JonB Thank you.
Can you please help me with an example or link on how to send a signal to the GUI thread.@Khamisi-Kibet @JonB I figured it out. [Solved]