0

i want to ask if there is a way to set the text of a QTextBrowser without changing its style. I'm using pyqt. I use Qt Creator to define the window style but i can't change a QTextBrowser text without chaning its style so i mainly have to full my code of html code to reach my goal.

My ultimate weapon is to build a method that read the current QTextBrowser HTML and modify it (probably with regexp) to keep the style untouched. Is theren't a simplier way?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
brazoayeye
  • 329
  • 1
  • 2
  • 14
  • Please edit your question to include a [mcve]. Without that it's very difficult (for me at least) to understand the issue you're seeing. – G.M. Sep 07 '17 at 19:19
  • Why not using a prepared text (containing all the html, styles, ecc.) and QString::arg to replace/set the text-parts you need to change? – Robert Sep 08 '17 at 06:12

0 Answers0