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 /doc | |
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 'doc')
-rw-r--r-- | doc/global/includes/cli-build-cmake.qdocinc | 66 | ||||
-rw-r--r-- | doc/global/includes/examples-run.qdocinc | 4 |
2 files changed, 68 insertions, 2 deletions
diff --git a/doc/global/includes/cli-build-cmake.qdocinc b/doc/global/includes/cli-build-cmake.qdocinc new file mode 100644 index 0000000000..efdbfd77bd --- /dev/null +++ b/doc/global/includes/cli-build-cmake.qdocinc @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2022 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [cli-build-cmake] + + \section1 Building and Running from the Command Line + + To build an example application from the command line, create a build + directory for it. Switch to the build directory and run \c qt-cmake to + configure your project for building. If the project is configured + successfully, the generated files enable you to build the project. + + \badcode + md <build_directory> + cd <build_directory> + <qt_installation_directory>\bin\qt-cmake -GNinja <source_directory> + <generator> + \endcode + + The commands create an executable in the build directory. The \c CMake + tool reads the project file and produces instructions for how to build + the application. The generator then uses the instructions to produce + the executable binary. + + For example, to build the Notepad example on Windows, when using Ninja + as the generator, enter the following commands: + + \badcode + md notepad-build + cd notepad-build + C:\Qt\6.2.1\msvc2019_64\bin\qt-cmake -GNinja C:\Examples\notepad + ninja + \endcode + + If you do not use Ninja as the generator, use the generator-independent + CMake command to build the application instead of \c ninja: + + \badcode + cmake --build + \endcode + +//! [cli-build-cmake] diff --git a/doc/global/includes/examples-run.qdocinc b/doc/global/includes/examples-run.qdocinc index e9b8575650..96be9e3f3b 100644 --- a/doc/global/includes/examples-run.qdocinc +++ b/doc/global/includes/examples-run.qdocinc @@ -1,5 +1,5 @@ \section1 Running the Example -To run the example from \l{Qt Creator Manual}{Qt Creator}, open the \gui Welcome -mode and select the example from \gui Examples. For more information, visit +To run the example from \l{Qt Creator Manual}{Qt Creator}, open the \uicontrol Welcome +mode and select the example from \uicontrol Examples. For more information, visit \l{Qt Creator: Building and Running an Example}{Building and Running an Example}. |