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"

  • Qt Champions 2018

    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

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