QtCreator: Application output



  • HI ,
    i know this quesiton was raised a lot of times, howver still don't see the answer.
    How to put console output into APplication output panel in Qt Creator?

    I see mostly the reply is a using qDebug()

    however Qt SDK is not installed on my host

    the only way is a using standard library .

    any ideas, please?


  • Qt Champions 2016

    @amigo421
    Hello,
    You could write to the output stream using QTextStream, however I'm not sure it'll get into the QtCreator applicaiton output window. Usually qDebug() is used for that, but you could try this one as well:

    QTextStream cerr(stderr);
    cerr << "Something that appears on the error stream";
    

    Or for the console window:

    QTextStream cout(stdout);
    cout << "Something that appears on the standard output";
    

    If you're not using Qt, you could try the standard streams:

    srd::cerr << "Some text on the error stream";
    

    Kind regards.



  • In Qt Creator, go to Projects and Run, there is a checkbox 'Run in terminal'. If you uncheck that your output wil be printed in Qt creators' "Application Output" panel.

    Hope that is what you want



  • did you really check this? it doesn't work for me;

    1. std::cerr output is not shown in APplication Output
    2. std::cout is also not showing there
      independently of in console or not option

    Debugging starts
    Debugging has finished

    is only messages in Application Output



  • I don't know if you resolved, but the ultimate correct answer for me was that of asanaka424.


Log in to reply
 

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