I'm not very fit with the QString class. I need to build a string representation of data which is a mixture of text and data. Is there a more elegant way than doing this?

Qt Code:
  1. QString string;
  2. QString temp;
  3. QList<float> angles;
  4.  
  5. string = "data starts here: ";
  6. for (int i = 0; i <angles->size(); i++)
  7. {
  8. temp.sprintf("\t%.2f", angles.at(i));
  9. string.append(temp);
  10. }
To copy to clipboard, switch view to plain text mode 

And then what's the best way to print this string to stdout? All I know is printf from C and I can't get that to work with Qstring.

Thanks
Cruz