I've an other Question:
After create my_worker and try to move it in my QThread I got this error during execution:
@QObject: Cannot create children for a parent that is in a different thread.
(Parent is QNativeSocketEngine(0x15d345b8), parent's thread is QThread(0x15cfdc78), current thread is QThread(0x15d345d8).@
And worker stop to work...
I don't know why ?
Is it problem with my QTcpServer ?
I haven't any exec method, because Worker herit from QObject and My Worker stop to work after one request attempt to my server.
EDIT :
Problem solved:
I'm using :
@connect(my_soc, SIGNAL(readyRead()), this, SLOT(tcp_receve_commands()), Qt::DirectConnection);
connect(my_soc, SIGNAL(disconnected()), this, SLOT(kill_thread()), Qt::DirectConnection);@
Now, because without Qt::DirectConnection, connections aren't executed in the Thread.
Thanks a lot all for your help, my problem is solved !
I love Qt ^^ !