Why don't you use the newConnection signal? Then you don't need threads.