Timers
-
@
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv); fd = open(MODEMDEVICE,O_RDWR|O_NOCTTY);While(true)
{
Buffer.clear();
nreturn = read(fd,&chBuf,1);
if(nreturn > 0)
{
for(i=0;i<nreturn;i++)
{
Buffer.append(chBuf[i]);if(chBuf0 == 0xc9) nReadIndex = 0;
pData[nReadIndex++] = chBuf[i];
qDebug() << “data” << Buffer.toHex();
}
if(chBuf0 == 0xcf)
{
if(nReadIndex >= 10)//Display of Gui opreration //
nReadIndex = 0;
}
@For this how can i use timers instead of while loop, where should i start timer , i tried but am geting segmentation problem.Please help me
-
hi.
"find here":http://qt-project.org/doc/qt-5/qtimer.html
"Example":http://stackoverflow.com/questions/11651852/how-to-use-qtimerhope this helps.