Main window's close event is cought and handled due to content change

master
Denes Matetelki 14 years ago
parent edad97d19a
commit 165842b1fd

@ -296,6 +296,11 @@ void MainWindow::about()
msgBox.exec();
}
void MainWindow::closeEvent(QCloseEvent * event)
{
m_contentChanged && !closeFile() ? event->ignore() : event->accept();
}
void MainWindow::setTitle(const QString &title)
{
if (title.isEmpty())

@ -35,6 +35,9 @@ public slots:
void keys();
void about();
protected:
void closeEvent(QCloseEvent * event);
private:
void setTitle(const QString &title);

Loading…
Cancel
Save