Do you want to display the text in a text editor or a label?

If so, use something like:

Qt Code:
  1. QString("Number = %1").arg(x);
To copy to clipboard, switch view to plain text mode 
Use the setText or setPlainText function of the text edit or label