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




Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.