how to change text color in Qstring......
how to change text color in Qstring......
QString doesn't have a text color, it's just a string, not a widget that has a visual representation.
For example if you show your string in a QLabel you can change the color using Qt Style Sheets like this:
See the documentation for other widgets.Qt Code:
w0->setStyleSheet("QLabel { background-color : red; color : blue; }");To copy to clipboard, switch view to plain text mode
thanks a lot...
For such a task please use QPalette. The Qt style sheets are not developed further and for that they are pure overhead.
amarnath.rb.tc@gmail.com (29th May 2012), Zlatomir (30th May 2012)
Bookmarks