PDA

View Full Version : prints nothing in application output



ramin.lich
30th September 2014, 16:37
hi all

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 There";
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.

ChrisW67
30th September 2014, 22:07
Where are you looking for this output?

ramin.lich
1st October 2014, 10:46
The Problem Solved With This
CONFIG += console :D
I Was Looking To Down Sidebar(Qt Creator) Third Option That Name Is Application Output