alusuel
14th July 2006, 09:50
Hi,
can anyone have any experience with Qhttp and QThread in Qt 3.5.
I am tring to put Qhttp connection inside QThread, I would like to close the whole Http action into QThread run fucntion, however Qhttp works asynchronously so I have to wait inside run fucntion until http finish its work and this is the problem :/
I created Qhttp object inside my thread, connected its signals to my thread, and in my run fucntion after starting the http action I am trying to wait for its finish ( flag is changed in the slots function)
void MyThread::run()
{
m_pHttp->setHost(...
m_pHttp->get(...
while(m_bFlag)
qApp->processEvents();
processHttpResults();
}
any ideas?
it seems to work, but the whole application behaves strangly when the network connection is lost
wbr,
alusuel
can anyone have any experience with Qhttp and QThread in Qt 3.5.
I am tring to put Qhttp connection inside QThread, I would like to close the whole Http action into QThread run fucntion, however Qhttp works asynchronously so I have to wait inside run fucntion until http finish its work and this is the problem :/
I created Qhttp object inside my thread, connected its signals to my thread, and in my run fucntion after starting the http action I am trying to wait for its finish ( flag is changed in the slots function)
void MyThread::run()
{
m_pHttp->setHost(...
m_pHttp->get(...
while(m_bFlag)
qApp->processEvents();
processHttpResults();
}
any ideas?
it seems to work, but the whole application behaves strangly when the network connection is lost
wbr,
alusuel