Thanks for reply.
I tried like :
testClass *tCls = new testClass();
t.start();
tCls->moveToThread(&t);
QObject::connect(&w,
SIGNAL(startSignal
()),tCls,
SLOT(startWork
()),Qt
::QueuedConnection);
w.show();
testClass *tCls = new testClass();
QThread t;
t.start();
tCls->moveToThread(&t);
QObject::connect(&w,SIGNAL(startSignal()),tCls,SLOT(startWork()),Qt::QueuedConnection);
w.show();
To copy to clipboard, switch view to plain text mode
I am getting segmentation fault.
Or will I take one more class and inherits QThread and after that execute movetoThread.
One more thing. It is working but I dont know this is corret or not .
tCls->moveToThread(tCls);
tCls
->start
(QThread::NormalPriority);
tCls->moveToThread(tCls);
tCls->start(QThread::NormalPriority);
To copy to clipboard, switch view to plain text mode
thanks.
Bookmarks