something like this ?

Qt Code:
  1. ...
  2. QObject::connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttons(QAbstractButton*)));
  3. }
  4.  
  5. void class::buttons(QAbstractButton *button)
  6. {
  7. if (button->text() == tr("Reset"))
  8. button_reset();
  9. else if (button->text() == tr("OK"))
  10. button_ok();
  11. else if (button->text() == tr("Close"))
  12. button_close();
  13. }
To copy to clipboard, switch view to plain text mode