First question, as usual when threads are used: are you sure you need to use one?
Then a couple of suggestions:
- do not delete the socket in the detructor, delete it after exec() returns, i.e. within the worker thread.
- no need to make the QHostAddress a pointer
- do not make internal slots public
- be aware that your slots are currently executed in the main thread, so do not access "socket" in them
Cheers,
_





Reply With Quote


Bookmarks