There are MainWindow and Dialog by clicking on the button in the MainWindow window opens. How to make that on pressing the button (pushButton) in Dialog this dialog box was closed?
#include "dialog.h" #include "ui_dialog.h" Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog() { delete ui; } void Dialog::on_pushButton_clicked() { }