It's an old thread, but my internet search turned it up so for other travellers I thought it'd be helpful to translate anda_skoa's suggestion into code:
...
// in dialog class definition in header file
private slot:
void on_reset_clicked();
...
// in the dialog cpp file:
#include <QPushButton>
...
// in dialog contructor:
connect(ui
->buttonBox
->button
(QDialogButtonBox::Reset),
SIGNAL(clicked
()),
SLOT(on_reset_clicked
()) ...
// and finally the clicked method
void on_reset_clicked()
{
// Your code here
}
...
// in dialog class definition in header file
private slot:
void on_reset_clicked();
...
// in the dialog cpp file:
#include <QPushButton>
...
// in dialog contructor:
connect(ui->buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()), SLOT(on_reset_clicked())
...
// and finally the clicked method
void on_reset_clicked()
{
// Your code here
}
To copy to clipboard, switch view to plain text mode
Bookmarks