I have this global variable. void * userInterface;
and this line in main.cpp _beginthread( ReceiveThread, 0, NULL);
and
ReceiveThread
void ReceiveThread( void* Param )
{
...........
QString str;
rovkonInterface *w=((rovkonInterface *)userInterface);
w->ui.systemStatusText->insertPlainText("abc");
........
and I get runtime error:
ASSERT:"qApp && qApp->thread()==currentQThread" in file ....
and I tested same code snippet in normal functions and it worked properly. Also I used other global variable also without a problem, but when insert the line: w->ui.systemStatusText->insertPlainText("abc");
I am getting runtime error.
What can be the problem?
Thanks.