标签:qt
//mainwindow.h #include <QMdiArea> private: QMdiArea *mdiArea;
//mainwindow.cpp #include <QDialog> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); mdiArea=new QMdiArea(); setCentralWidget(mdiArea); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_actionA_triggered() { QDialog *dlg=new QDialog(); mdiArea->addSubWindow(dlg); dlg->show(); }
标签:qt
原文地址:http://blog.csdn.net/fuzimango/article/details/45920869