Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to create Nested QThread( Create one inside another)?
I have One Worker Thead
QThread* thread = new QThread;
connect(thread, SIGNAL (started()), mTcpProcess, SLOT (run()));//Run
connect(mTcpProcess, SIGNAL (finished()), thread, SLOT (quit()));//Quit thread
connect(thread, SIGNAL (finished()), thread, SLOT (deleteLater()));//Delete Thread
is it possible to create other thread inside mTcpProcess?
@brucezcg Sure, you can create a thread from another thread. You're already doing this when you create your first thread (it is created from the main thread).
@jsulm Thanks, and one more question, how to do sleep in function run() which inside my worker class (inherit from QObject)
Be carefull with the sleep function, chances are high, that you’re approaching this from the wrong angle.
Especially if you’re new to Qt’s threading system, which I asume you are, from your questions in this topic.
@J.Hilk Okay, Thanks