try

Qt Code:
  1. QPushButton *pb = (QPushButton *)sender();
  2.  
  3. if(pb){
  4. display->setText(pb->text());
  5. }
To copy to clipboard, switch view to plain text mode