Home > Mobile >  QT TextEdit display text with [0, 30, 41 m?
QT TextEdit display text with [0, 30, 41 m?

Time:09-20

Printf (" \ [033 0, 30, 41 m color!!! \ [0 033 m Hello \ n "); can display the normal color, but now I want to put the string in TextEdit controls showed that he can't show color, can only display 033 \ [0, 30, 41 m color!!! \ 033 [0 m Hello, this is what to do, consult

CodePudding user response:

\ 033 does not show, but probably means can't show the color

CodePudding user response:

Printf output to the terminal window system, so it shows color,
QTextEdit is just a display text editing text controls, to show different color, different place try changing a string to Html format,

CodePudding user response:

refer to the second floor it is a nice nickname response:
printf output to a terminal window system, and shows the color,
QTextEdit is just a display text editing text controls, to show different color, different place try changing a string to Html format,
mainly with the escape sequence, how to convert to Html? What method can be used? Decoding programming?
  •  Tags:  
  • Qt