Its keyword : "explicit deletion"! See my last post again, and in fact, it was written with explicit deletion to the UI form instance.
samplewidget.cpp
#include "samplewidget.h"
#include "ui_samplewidget.h"
SampleWidget::SampleWidget(QWidget *parent)
: QWidget(parent), ui(new Ui::SampleWidgetClass)
{
ui->setupUi(this);
}
SampleWidget::~SampleWidget()
{
delete ui;
}
A reason of these approach is the scalability. For more detail, read the thread archives of QtCreator's mail list, title : "[Qt-creator] Multiple Iheritance".
No comments:
Post a Comment