Hello, I have a QMainWindow, I want to call a QDialog (its is ready with sorce code, header, and ui file) when push a button.

Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent) :
  5. QMainWindow(parent),
  6. ui(new Ui::MainWindow)
  7. {
  8. ui->setupUi(this);
  9. }
  10.  
  11. MainWindow::~MainWindow()
  12. {
  13. delete ui;
  14. }
  15.  
  16. void MainWindow::on_pushButton_clicked()
  17. {
  18. What I Must Write Here to Open My Dialog
  19. }
To copy to clipboard, switch view to plain text mode 

I added dialog.h, dialog.cpp and dialog.ui to my project.


Thanks