I am not sure if I understand properly, but what I use when trying to do something like that is use QStringLists and the .join() funtion.... It would be something like this, if you were trying to put units at the end of a number....
list << time << "s"; //puts the time, 150 as the first item in the list, then s.
list.join(" "); //putting a space in the quotation marks joins the two strings in the list with a space between the entities.
//this string will now look like "150 s"
QString time = "150";
QStringList list;
list << time << "s"; //puts the time, 150 as the first item in the list, then s.
list.join(" "); //putting a space in the quotation marks joins the two strings in the list with a space between the entities.
//this string will now look like "150 s"
To copy to clipboard, switch view to plain text mode
you can put this QString in your QLabel, or whatever you chose. I'm sure this isn't the best way, but I like to do it this way.
Bookmarks