mcht_z
9th March 2011, 18:10
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.
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
What I Must Write Here to Open My Dialog
}
I added dialog.h, dialog.cpp and dialog.ui to my project.
Thanks
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
What I Must Write Here to Open My Dialog
}
I added dialog.h, dialog.cpp and dialog.ui to my project.
Thanks