Qt World Summit: Submit your Presentation

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);
            QTextStream textStream(&file);
               // 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"

  • printf is just the "C way" of printing to standard output. it does nothing useful for the program, it just prints stuff to the console

Log in to reply