Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] prints nothing in application output
Forum Updated to NodeBB v4.3 + New Features

[Solved] prints nothing in application output

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 745 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raminlich
    wrote on last edited by
    #1

    hi all this is my prog
    @if(size==0){
    readD.open(QIODevice::ReadOnly);
    QTextStream foint(&readD);
    foint>>flowtime;
    readD.close();
    for(;;){
    this_thread::sleep_for(chrono::seconds(10));
    time_t now=time(0);

          times.open(QIODevice::WriteOnly);
          QTextStream goes(&times),loint(&today);
          goes<<now;
          times.close();
    
              double secs=difftime(now,flowtime);
    
    
              today.open(QIODevice::WriteOnly);
              loint<<secs<<"\n";
              today.close();
    
    
    }
    

    }
    else{
    qDebug()<<"Is Here";
    readD.open(QIODevice::ReadOnly);
    QTextStream foint(&readD);
    foint>>flowtime;
    readD.close();
    int seci=0;
    for(;;){

            this_thread::sleep_for(chrono::seconds(10));
            engine.open(QIODevice::ReadWrite);
            QTextStream eng(&engine);
            eng<<seci;
            engine.close();
            seci+=10;
            if(seci==60){
                seci=0;
                today.open(QIODevice::WriteOnly | QIODevice::Append);
                QTextStream fps(&today);
                fps<<60<<endl;
                today.close();
            }
    

    }
    }
    }
    @
    I Already Check this code The Program Will Enter Else But Only Will Not Print Message That I Write With qDebug Other Codes in Else Will Run Perfectly.

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hi..
      The solution is simple: add CONFIG += console to your .pro file and rebuild the whole project.

      hope it helps

      Be Cute

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved