1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#include <QDialog> #include <QDebug> #include "ui_test.h" namespace Ui{ class Test; }; class Test : public QDialog{ Q_OBJECT private: Ui::Test *ui; private slots: void on_push_close_clicked(){ this->close(); } public: Test() : QDialog(), ui(new Ui::Test){ qDebug() << "Creating Test Dialog:"; ui->setupUi(this); qDebug() << "Loaded Dialog"; } ~Test(){ delete ui; } };