Important: Please read the Qt Code of Conduct -

QT Console application - go back up one line and add text to current line

  • Hi all

    I have been searching for this for some time, yet have had no luck discovering how to do it.

    I would like to return to the previous line, and add text to it, a scenario with e.g. below

    When running make on some linux makefile's, I noticed the following:

    checking file ...... done
    checking file2 ...... done
    checking file3-long name ...... done
    checking file4 ...... done

    This would be done with a similar & basic psuedocode concept (to my knowledge and understanding).

    std::cout << "checking: " << fileName << " ........ " << std::endl;
    std::cout << "done" << std::endl;

    This will output:

    checking: {fileName} ........

    Is there a way I can add the done after the ellipse?

    I recall reading something on ncurses, and a few other libs, but I would prefer if this can be done purely using Qt

    Thanks in advance

  • Lifetime Qt Champion


    As silly as it may sound but wouldn't removing << std::endl from the checking line be enough ?