Your code is okay.
your application crashes upon clicking the next button because you are creating an info object and showing it but in your info.cpp you dont initailse the UI.
ui(new Ui::info)
{
ui->setupUi(this);
}
info::info(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::info)
{
ui->setupUi(this);
}
To copy to clipboard, switch view to plain text mode
.
The slot process() gets executed upon clicking next so your connect statement works.
Now do whatever you want in that slot.
Something like:
void MainWindow::process()
{
// this->hide(); /*if you wanna use the hide function you have to take care of info's parent.*/
info *i = new info(this);
i->show();
}
void MainWindow::process()
{
// this->hide(); /*if you wanna use the hide function you have to take care of info's parent.*/
info *i = new info(this);
i->show();
}
To copy to clipboard, switch view to plain text mode
Good Luck.
Bookmarks