Home > Mobile >  QT5.9 write string to TextBrowser, how to highlight some characters, such as color, underline, bold
QT5.9 write string to TextBrowser, how to highlight some characters, such as color, underline, bold

Time:10-01

as title
QT5.9 write string to TextBrowser, how to highlight some characters, such as color, underline, bold show?
How character AD FB red in the following example:
00 00 00 00 00 00 00 00 AD FB 00 00 00 00 00 00

CodePudding user response:

Overloaded paintEvent? And then drawText?

CodePudding user response:

reference 1/f, it is a nice nickname response:
overloaded paintEvent? And then drawText?

Can point in more detail? Did not understand

CodePudding user response:



SetText (" & lt; Font color='red' & gt;


Web site: & lt; Font color='blue' & gt; www.baidu.com Click on the open & lt;/i>
CodePudding user response:

refer to the second floor dcr1105 response:
Quote: reference 1/f, it is a nice nickname response:

Overloaded paintEvent? And then drawText?

Can point in more detail? Don't see


See above,
Since he can load the HTML that is to use HTML parsing ready for him

CodePudding user response:

this is a nice nickname reference 4 floor response:
Quote: refer to the second floor dcr1105 response:

Quote: reference 1/f, this is a nice nickname response:

Overloaded paintEvent? And then drawText?

Can point in more detail? Don't see


See above,
Since he can load the HTML that to use HTML parsing great

Thank you, this is a kind of solution, but the content is uncertain, I wrote: are there any other way?

CodePudding user response:

reference 5 floor dcr1105 reply:
Quote: this is a nice nickname reference 4 floor response:

Quote: refer to the second floor dcr1105 response:

Quote: reference 1/f, this is a nice nickname response:

Overloaded paintEvent? And then drawText?

Can point in more detail? Don't see


See above,
Since he can load the HTML that to use HTML parsing great

Thank you, this is a kind of solution, but the content is uncertain, I wrote: are there any other way?

Uncertainty is to point to? Can't get to the text and then insert the Html in the QString things setText to implement?

  •  Tags:  
  • Qt