A Question about QFile & QTextStream
-
A method loadFile which is a module of a program , a part of a notepad
void ImgProcessor::loadFile(QString filename) { printf("file name:%s\n",filename.data()); QFile file(filename); if(file.open(QIODevice::ReadOnly|QIODevice::Text)) { QTextStream textStream(&file); while(!textStream.atEnd()) { showWidget->text->append(textStream.readLine()); // printf("read line \n"); ?????? //printf("end\n"); ???? } } }
who can tell me ,why there are two "printf"
when i comment it ,nothing different ,
i can't understand the "printf"