Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many threads does Qt create to work in the background?

I use qt a lot. I want to know something: how many threads does Qt create do to things in the background? like handling signals and slots..

Also, any GUI toolkit creates Event threads too (i seem to remember java does). Does Qt create one too?

EDIT: when I say "how many threads", I really mean which threads

Thanks,
jrh

like image 894
jrharshath Avatar asked Dec 10 '22 19:12

jrharshath


1 Answers

Qt's signals and slots are not implemented using multiple threads, they're just a way of handling the bookkeeping for event distribution.

One thing you can do is run your program, count the threads using whatever OS facility you like (such as Task Manager on Windows), and see whether that matches what you expect. I wouldn't expect Qt to create any additional threads unless you ask it to.

like image 110
Greg Hewgill Avatar answered Jun 07 '23 20:06

Greg Hewgill