I am looking for a way to get all threads created by one of my class to let me use them (threads are created dynamically depending on the user and I can’t predict how many will be working while my application is working). Is there a good way to get all thread objects pointers and put them in one place so I can manipulate those threads?
Share
As a first, the best solution would definitely to keep track of the
QThread‘s created. Even if they are created “on-the-fly”, you should be able to store pointer to them, even globally.Assuming they are at least parented to the same
QObject, you could use:To find all child
QThread‘s