Coloring the QString
-
wrote on 27 Sept 2012, 06:30 last edited by
@QString text("<FONT COLOR=red>%1</FONT>");
text.arg(strMat);
QDomNode text_node
text_node.setNodeValue(text);@I have the above code . what i want is text color shall be red and that text value shall be decided during the run time .
-
wrote on 27 Sept 2012, 07:21 last edited by
Using HTML to color a text can work, but in a QDomNode? I don't get that. QDomNode is not for displaying...
-
wrote on 27 Sept 2012, 07:37 last edited by
My requirement is to coloring the QString then setting that color text in QDomNode .
that is the thing i want to do in the above code .
But i am not able to know why its not working . -
wrote on 27 Sept 2012, 07:40 last edited by
But having a colored string in a domnode is nonsense. Color is a display property, and a QDomNode is not displayed. How do you even check if your coloring worked if you can't display it?
1/4