I have a global variable that i set on a cpp file on my qt project. I want to check this variable in every 100ms for 5 second and if the variable is 0 after 5 seconds I want to create a message box. Here is the sample of my code:
db.cpp:
if(case){
g_clickedObj.readFlag = 1 ;
}
else{
g_clickedObj.readFlag = 0 ;
}
mainwindow.cpp
this->tmr = new QTimer();
connect(this->tmr,SIGNAL(timeout()),this,SLOT(callSearchMachine()));
tmr->start(5000);