Reputation: 742
Hello i would like to add different color on specific words of a string to be used in QML Text
Text {
text: "Blue Red Yellow Green"
}
I know that you can add color to the whole text, but i would like to add specific color on specific words. is this possible? and how is it achieved?
Upvotes: 5
Views: 3589
Reputation: 32685
Text
items can display both plain and rich text. For example you can have:
Text {
text: "<font color=\"#0000FF\">Blue</font> <font color=\"#FF0000\">Red</font>"
}
Upvotes: 12