hello i have this ‘access violation reading…” error in QtConcurrent thread when am i terminating my application. My thread is updating some status in QLabel. it seems like when i exit my application QLabel object is being destroyed and my thread is working on it. how can i resolve it ? here is my source
void Sparsh::connectCam()
{
QString str[]={"Connecting.","Connecting..","Connecting..."};
unsigned int i=1;
while(!mycam.Connect(FIRST_AVAILABLE))
{
if(ui.lblStatus) // i tried this but no help :(
ui.lblStatus->setText(str[i%3]);
Sleep(1000);
i++;
}
camconnected=true;
ui.lblStatus->setText("Device Connected...!");
}
↧