
Originally Posted by
Yorma
How do I wrap it so that it does not show you the variables name, but what is stored in them instead?
QString colour;
// you can use also QColor // ...
QString template = tr
("<font color='%1'>%2</font>");
somelabel->setText( template.arg( colour, text ) );
QString colour; // you can use also QColor
QString text;
// ...
QString template = tr("<font color='%1'>%2</font>");
somelabel->setText( template.arg( colour, text ) );
To copy to clipboard, switch view to plain text mode
Bookmarks