diff options
Diffstat (limited to 'examples/mainwindows/application/mainwindow.cpp')
-rw-r--r-- | examples/mainwindows/application/mainwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp index a1eb9b6..68c7287 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); |