Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT Console application - go back up one line and add text to current line

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
consoleconsole applicatextstringformatting
2 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CybeX
    wrote on 23 Jan 2017, 22:31 last edited by
    #1

    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

    E.g.
    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
    //etc

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

    std::cout << "checking: " << fileName << " ........ " << std::endl;
    runCheck(fileName)
    std::cout << "done" << std::endl;
    

    This will output:

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

    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

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jan 2017, 22:35 last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3

      1/2

      23 Jan 2017, 22:31

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved