Results 1 to 5 of 5

Thread: Get contents from output of console app

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    518
    Thanks
    13
    Thanked 77 Times in 75 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Get contents from output of console app

    Hi, if you want to replace the last line you can use "\r" to go to the beginning of the line before printing something else.
    If you really need to know what you printed last time then store it in a variable. Although I concur with d_stranz: just print the correct line.

    Ginsengelf

  2. #2
    Join Date
    May 2018
    Posts
    19
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Get contents from output of console app

    I also need get content of console output
    I have two way to print:
    qDebug() << "Content";
    QTextStream out(stdout); out <<"Content";
    Which solution is the best for this?

  3. #3
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    518
    Thanks
    13
    Thanked 77 Times in 75 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Get contents from output of console app

    Hi, qDebug won't be visible in release builds, so use the second option.

    Ginsengelf

Similar Threads

  1. Qt Creator Display console output in main window in a sidebar
    By Cupidvogel in forum Qt Tools
    Replies: 4
    Last Post: 30th May 2014, 09:54
  2. console output on windows and ubuntu
    By hannesvdc in forum Qt Programming
    Replies: 2
    Last Post: 11th December 2010, 22:43
  3. No output to console
    By Morea in forum Newbie
    Replies: 6
    Last Post: 1st November 2007, 22:51
  4. Replies: 52
    Last Post: 10th December 2006, 14:32
  5. No console output in Mac OSX using Qt4
    By popoholic in forum Qt Programming
    Replies: 2
    Last Post: 26th September 2006, 01:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.