Hi,

I tried double the backslash with code
std::cout << "\\e[38;5;82mHello \\e[38;5;198mWorld" << std::endl;,
 the output is like
"\e[38;5;82mHello \e[38;5;198mWorld"
Any other suggestion for making it work correctly?

Thanks,
Xiaofeng

On Sat, Dec 27, 2014 at 9:14 AM, Petar Perisin <[email protected]>
wrote:

> Hi,
>
> I haven't tried, but try to double the backslash:
>
> std::cout << “\\e[38;5;82mHello \\e[38;5;198mWorld” << std::endl;
>
> also, you might need to end colors somewhere.
>
> Regards,
> Petar
>
> On Sat, Dec 27, 2014 at 3:34 AM, Xiaofeng Wu <[email protected]> wrote:
>
>> 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?
>>
>> _______________________________________________
>> Qt-creator mailing list
>> [email protected]
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>>
>
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to