Qt World Summit: Register Today!

How to show colored text in Qt Creator application output panel?

  • In the change log of Qt Creator 3.3.0, it says the application output panel support ansi color.
    But when I try to print colored texts like

    std::cout << "\e[38;5;82mHello \e[38;5;198mWorld" << std::endl;

    What I can see from the application output panel is the verbatim output of the string, instead of colored text of "Hello Wolrd"

    Am I using it in the wrong way?

  • Mayb only through qDebug()? Although that would be stupid.

Log in to reply