Setting QTextBrowser text background color
Solved
General and Desktop
-
@Q139
Untested, but I assume since both of those accept HTML (you're prepared to use that, right?) you can use stylesheet{background-color: ...}
around each individual character? Say like:<span style='background-color: red;'>R</span><span style='background-color: green;'>G</span><span style='background-color: blue;'>B</span>...
Unless someone else knows better/a better way?
-
@Q139
Assuming QSS is approximately similar to HTML CSS,background
does a lot more than just set the color: https://developer.mozilla.org/en-US/docs/Web/CSS/background. It so happens thatbackground: green;
sets the color alone. I would usebackground-color
, no need to abbreviate.