Qt Code:
  1. QString text("<FONT COLOR=red>%1</FONT>");
  2. text.arg(strMat);
  3. QDomNode text_node
  4. text_node.setNodeValue(text);
To copy to clipboard, switch view to plain text mode 

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 .