diff options
| author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2022-01-21 18:30:37 +0100 |
|---|---|---|
| committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2022-01-31 14:24:11 +0100 |
| commit | ec57418ecfc1bf7cfbc0dd7b33c899ce24b4a49d (patch) | |
| tree | 08c616511b9755eddff06d140353f76a560afab6 /examples/widgets/tutorials/notepad | |
| parent | a3503c8eae08a393233f5f5c187a51c9c0d98b5e (diff) | |
Doc: Update Notepad tutorial
Update to use Qt Creator 7.0 and CMake as the build system.
Fixes: QTBUG-100075
Pick-to: 6.3
Change-Id: I71e1d1446a2c79c98423ca5d4427b4b4eb00021b
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'examples/widgets/tutorials/notepad')
| -rw-r--r-- | examples/widgets/tutorials/notepad/main.cpp | 12 | ||||
| -rw-r--r-- | examples/widgets/tutorials/notepad/notepad.h | 23 |
2 files changed, 6 insertions, 29 deletions
diff --git a/examples/widgets/tutorials/notepad/main.cpp b/examples/widgets/tutorials/notepad/main.cpp index 20bcdaa7df9..af5b09eedc5 100644 --- a/examples/widgets/tutorials/notepad/main.cpp +++ b/examples/widgets/tutorials/notepad/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -49,13 +49,13 @@ ****************************************************************************/ #include "notepad.h" + #include <QApplication> int main(int argc, char *argv[]) { - QApplication EditorApp(argc, argv); - Notepad Editor; - Editor.show(); - - return EditorApp.exec(); + QApplication a(argc, argv); + Notepad w; + w.show(); + return a.exec(); } diff --git a/examples/widgets/tutorials/notepad/notepad.h b/examples/widgets/tutorials/notepad/notepad.h index d4209daf6d9..03daa82a917 100644 --- a/examples/widgets/tutorials/notepad/notepad.h +++ b/examples/widgets/tutorials/notepad/notepad.h @@ -51,60 +51,37 @@ #ifndef NOTEPAD_H #define NOTEPAD_H -//! [all] -//! [1] #include <QMainWindow> -//! [1] -//! [2] QT_BEGIN_NAMESPACE namespace Ui { class Notepad; } QT_END_NAMESPACE -//! [2] -//! [3] class Notepad : public QMainWindow { Q_OBJECT -//! [3] -//! [4] public: explicit Notepad(QWidget *parent = nullptr); -//! [4] -//! [5] ~Notepad(); -//! [5] private slots: void newDocument(); - void open(); - void save(); - void saveAs(); - void print(); - void selectFont(); - void setFontBold(bool bold); - void setFontUnderline(bool underline); - void setFontItalic(bool italic); - void about(); -//! [6] private: Ui::Notepad *ui; QString currentFile; -//! [6] }; -//! [all] #endif // NOTEPAD_H |
