What did you try so far? And what is a "text box"? QLineEdit? QTextEdit? QTextBrowser? ...

Qt Code:
  1. // line edit
  2. lineEdit2->setText(lineEdit1->text());
  3.  
  4. // text edit
  5. textEdit2->setPlainText(textEdit1->toPlainText());
To copy to clipboard, switch view to plain text mode 

PS. QLineEdit offers a signal returnPressed().