diff options
Diffstat (limited to 'tools/qtconfig/previewwidget.cpp')
-rw-r--r-- | tools/qtconfig/previewwidget.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/qtconfig/previewwidget.cpp b/tools/qtconfig/previewwidget.cpp index 4a4a580..0573846 100644 --- a/tools/qtconfig/previewwidget.cpp +++ b/tools/qtconfig/previewwidget.cpp @@ -40,14 +40,15 @@ ****************************************************************************/ #include "previewwidget.h" +#include "ui_previewwidget.h" #include <QtEvents> QT_BEGIN_NAMESPACE PreviewWidget::PreviewWidget(QWidget *parent) - : QWidget(parent) + : QWidget(parent), ui(new Ui::PreviewWidget) { - setupUi(this); + ui->setupUi(this); // install event filter on child widgets QList<QWidget *> l = findChildren<QWidget *>(); @@ -57,13 +58,11 @@ PreviewWidget::PreviewWidget(QWidget *parent) } } - -void PreviewWidget::closeEvent(QCloseEvent *e) +PreviewWidget::~PreviewWidget() { - e->ignore(); + delete ui; } - bool PreviewWidget::eventFilter(QObject *, QEvent *e) { switch (e->type()) { @@ -82,4 +81,9 @@ bool PreviewWidget::eventFilter(QObject *, QEvent *e) return false; } +void PreviewWidget::closeEvent(QCloseEvent *e) +{ + e->ignore(); +} + QT_END_NAMESPACE |