You can connect the pushButtonConvert
button to MainWindow::convertFromEpochToHuman
in the constructor of MainWindow
, with:
connect(epochToHuman->ui->pushButtonConvert, SIGNAL(clicked(bool)), this, SLOT(convertFromEpochToHuman()));
You'll need to make the ui
member public first, like you have done for HumanToEpoch
.
You should move the declaration of your widgets into MainWindow.h
:
// ...
private:
Ui::MainWindow *ui;
EpochToHuman * epochToHuman;
HumanToEpoch * humanToEpoch;
// ...
and initialise them like this:
epochToHuman = new EpochToHuman(this);
humanToEpoch = new HumanToEpoch(this);