I would like to render ANSI colour with Qt4 in a QLabel or QTextEdit or anything else that would do.
Right now the QLabel(""\033[94m HELLO \033[0m"") renders the string as is.
How can I render ANSI colour or what is a good alternative in Qt4?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You would need to parse the string. A QLabel is either going to display plain text or html. That means you will need to transform it into html spans most likely.