From 2c235ea44bb3faf34592e6fe8871cb4370b88972 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 17 Aug 2012 11:21:43 +0200 Subject: [PATCH] Fixing easing curve editor Explicitly close the Qt Quick window. Change-Id: I9f3ed6155577b6d066ab00c407ce99f31b1263aa Reviewed-by: Joerg Bornemann --- tools/easingcurveeditor/mainwindow.cpp | 6 ++++++ tools/easingcurveeditor/mainwindow.h | 1 + 2 files changed, 7 insertions(+) diff --git a/tools/easingcurveeditor/mainwindow.cpp b/tools/easingcurveeditor/mainwindow.cpp index 3bd5b3e8..903c56c 100644 --- a/tools/easingcurveeditor/mainwindow.cpp +++ b/tools/easingcurveeditor/mainwindow.cpp @@ -98,6 +98,7 @@ MainWindow::MainWindow(QWidget *parent) : groupBoxLayout->addWidget(splineEditor->pointListWidget()); m_splineEditor = splineEditor; connect(ui_properties.plainTextEdit, SIGNAL(textChanged()), this, SLOT(textEditTextChanged())); + connect(this, SIGNAL(close()), this, SLOT(doClose())); initQml(); } @@ -134,3 +135,8 @@ void MainWindow::initQml() quickView.setSource(QUrl("qrc:/preview.qml")); quickView.show(); } + +void MainWindow::closeEvent(QCloseEvent *) +{ + quickView.close(); +} diff --git a/tools/easingcurveeditor/mainwindow.h b/tools/easingcurveeditor/mainwindow.h index 44591d3..4060009 100644 --- a/tools/easingcurveeditor/mainwindow.h +++ b/tools/easingcurveeditor/mainwindow.h @@ -64,6 +64,7 @@ public slots: protected: virtual void moveEvent(QMoveEvent *event); virtual void resizeEvent(QResizeEvent *event); + virtual void closeEvent(QCloseEvent *event); void initQml(); private: -- 2.7.4