summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows/application
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mainwindows/application')
-rw-r--r--examples/mainwindows/application/application.pro2
-rw-r--r--examples/mainwindows/application/mainwindow.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro
index ad1168a..fc022fc 100644
--- a/examples/mainwindows/application/application.pro
+++ b/examples/mainwindows/application/application.pro
@@ -10,3 +10,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS application.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index cf36332..6991ab3 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -328,9 +328,13 @@ void MainWindow::loadFile(const QString &fileName)
}
QTextStream in(&file);
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
textEdit->setPlainText(in.readAll());
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
setCurrentFile(fileName);
statusBar()->showMessage(tr("File loaded"), 2000);
@@ -351,9 +355,13 @@ bool MainWindow::saveFile(const QString &fileName)
}
QTextStream out(&file);
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
out << textEdit->toPlainText();
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
setCurrentFile(fileName);
statusBar()->showMessage(tr("File saved"), 2000);