Hi,
I am using the following code.. But I got the error like
THREAD Started
QObject: Cannot create children for a parent that is in a different thread.
(Parent is CGNetwork(0x10151d0d0), parent's thread is QThread(0x1016015b0), current thread is RenderThread(0x10155de40)
Code:
RenderThread.cpp
RenderThread::RenderThread(CGNetwork *cgnetwork)
{
cityUrl = "http://112.138.3.181/City/Cities";
categoryUrl = "http://112.138.3.181/City/Categories";
cgnetworks = cgnetwork;
start();
}
void RenderThread::run()
{
qDebug()<< "THREAD Started";
cgnetworks->getCityList(cityUrl);
}
Please help me. Thanks in advance.