Fixing easing curve editor
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Fri, 17 Aug 2012 09:21:43 +0000 (11:21 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Aug 2012 09:26:56 +0000 (11:26 +0200)
Explicitly close the Qt Quick window.

Change-Id: I9f3ed6155577b6d066ab00c407ce99f31b1263aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>

tools/easingcurveeditor/mainwindow.cpp
tools/easingcurveeditor/mainwindow.h

index 3bd5b3e..903c56c 100644 (file)
@@ -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();
+}
index 44591d3..4060009 100644 (file)
@@ -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: