#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <QDialog>
#include "mywidget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
connect(ui->pushButton, &QPushButton::clicked, this, [=](){
qDebug() << "clickedSlot";
QDialog dialog;
dialog.exec();
myWidget *widget = new myWidget();
widget->setAttribute(Qt::WA_DeleteOnClose);
widget->show();
});
}
08:12:27: Starting ...
clickedSlot
myWidget
~myWidget