C++ (Qt)#include "form.h"#include "mainwindow.h"#include "ui_form.h" Form::Form(QWidget *parent) : QWidget(parent), ui(new Ui::Form){ ui->setupUi(this);} Form::~Form(){ delete ui;} void MainWindow::newSlot(){ Form z; z.show();}
C++ (Qt)void MainWindow::newSlot(){ Form z; z.show();}
C++ (Qt)Form z(this);