From 2d9332410e4353e463c3e492bf4364396e45168d Mon Sep 17 00:00:00 2001 From: Kavindra Palaraja Date: Tue, 27 Aug 2019 16:51:30 +0200 Subject: Doc: Minor fixes and cleanup of an older topic Change-Id: I2e2c45ee160172a9800dbe74d507729e58f45c17 Reviewed-by: Andy Shaw --- doc/src/deployment/deployment-plugins.qdoc | 154 ++++++++++++++--------------- 1 file changed, 75 insertions(+), 79 deletions(-) diff --git a/doc/src/deployment/deployment-plugins.qdoc b/doc/src/deployment/deployment-plugins.qdoc index ff2bc1c88..69d8f1ba6 100644 --- a/doc/src/deployment/deployment-plugins.qdoc +++ b/doc/src/deployment/deployment-plugins.qdoc @@ -28,111 +28,107 @@ /*! \page deployment-plugins.html \title Deploying Plugins - \brief A guide to plugins-specific aspects of deploying Qt and Qt Application + \brief A guide to the plugin-specific aspects of deploying Qt and Qt Applications. - This document explains how to deploy plugin libraries that Qt or - your application should load at runtime. If you use - \l{How to Create Qt Plugins#Static Plugins}{static plugins}, then the - plugin code is already part of your application executable, and no - separate deployment steps are required. - - \tableofcontents + This topic explains how to deploy plugin libraries for Qt or your application to load at + runtime. If you use \l{How to Create Qt Plugins#Static Plugins}{static plugins}, then the + plugin code is already part of your application executable and no separate deployment steps + are required. \section1 The Plugin Directory - When the application is run, Qt will first treat the application's - executable directory as the base directory for searching for plugins. - For example if the - application is in \c{C:\Program Files\MyApp} and has a style plugin, - Qt will look in \c{C:\Program Files\MyApp\styles}. (See - QCoreApplication::applicationDirPath() for how to find out where - the application's executable is.) Qt will also look in the - directory specified by - QLibraryInfo::location(QLibraryInfo::PluginsPath), which typically - is located in \c QTDIR/plugins (where \c QTDIR is the directory - where Qt is installed). If you want Qt to look in additional - places you can add as many paths as you need with calls to - QCoreApplication::addLibraryPath(). And if you want to set your - own path or paths you can use QCoreApplication::setLibraryPaths(). - You can also use a \c qt.conf file to override the hard-coded - paths that are compiled into the Qt library. For more information, - see the \l {Using qt.conf} documentation. Yet another possibility - is to set the \c QT_PLUGIN_PATH environment variable before running - the application. If set, Qt will look for plugins in the - paths (separated by the system path separator) specified in the variable. - \note \c QT_PLUGIN_PATH should not be exported as a system-wide - environment variable since it can interfere with other Qt installations. + In Qt, when an application starts, the application's executable directory is the base directory + where Qt searches for plugins. + + For example, on Windows, if the application is in \c{C:\Program Files\MyApp} and it has a style + plugin, Qt looks in \c{C:\Program Files\MyApp\styles}. + + To find out where your application's executable is located, see + QCoreApplication::applicationDirPath(). + + Qt also looks in the directory specified by QLibraryInfo::location(QLibraryInfo::PluginsPath), + which typically is located in \c QTDIR/plugins; \c QTDIR is the directory where Qt is installed. + If you want Qt to look in additional places you can add as many paths as you need with calls to + QCoreApplication::addLibraryPath(). If you want to set your own path(s), you can use + QCoreApplication::setLibraryPaths(). + + Alternatively, you can use a \c qt.conf file to override the hard-coded paths that are compiled + into the Qt library. For more information, see \l {Using qt.conf}. + + Another possibility is to set the \c QT_PLUGIN_PATH environment variable before you run the + application; multiple paths can be separated with a system path separator. When set, Qt looks + for plugins in the paths specified in this variable. + + \note Do not export \c QT_PLUGIN_PATH as a system-wide environment variable because it can + interfere with other Qt installations. \section1 Loading and Verifying Plugins Dynamically - When loading plugins, the Qt library does some sanity checking to - determine whether or not the plugin can be loaded and used. This - provides the ability to have multiple versions and configurations of - the Qt library installed side by side. + When loading plugins, the Qt library does some sanity checking to determine whether the plugin + can be loaded and used. This sanity check enables you to have multiple Qt versions and + configurations installed side by side. - \list - \li Plugins linked with a Qt library that has a higher version number - will not be loaded by a library with a lower version number. + The following rules apply: - \br - \b{Example:} Qt 5.0.0 will \e{not} load a plugin built with Qt 5.0.1. + \list + \li Plugins linked with a Qt library that has a higher version number will not be loaded by a + library with a lower version number. - \li Plugins linked with a Qt library that has a lower major version - number will not be loaded by a library with a higher major version - number. + \br + \b{Example:} Qt 5.0.0 will \e{not} load a plugin built with Qt 5.0.1. - \br - \b{Example:} Qt 5.0.1 will \e{not} load a plugin built with Qt 4.8.2. - \br - \b{Example:} Qt 5.1.1 will load plugins built with Qt 5.1.0 and Qt 5.0.3. + \li Plugins linked with a Qt library that has a lower major version number will not be loaded + by a library with a higher major version number. + \br + \b{Example:} Qt 5.0.1 will \e{not} load a plugin built with Qt 4.8.2. + \br + \b{Example:} Qt 5.1.1 will load plugins built with Qt 5.1.0 and Qt 5.0.3. \endlist - When building plugins to extend an application, it is important to ensure - that the plugin is configured in the same way as the application. This means - that if the application was built in release mode, plugins should be built - in release mode, too. Except for Unix operating systems, plugins build in - a different mode will not get loaded by the plugin system. + When building plugins to extend an application, it's important to ensure that the plugin is + configured in the same way as the application. This means that if the application was built in + release mode, plugins should be built in release mode, too. Except for Unix operating systems, + where the plugin system will not load plugins built in a different mode from the application. - If you configure Qt to be built in both debug and release modes, - but only build applications in release mode, you need to ensure that your - plugins are also built in release mode. By default, if a debug build of Qt is - available, plugins will \e only be built in debug mode. To force the - plugins to be built in release mode, add the following line to the plugin's - project file: + If you configure Qt to be built in both debug and release modes, but only build your + applications in release mode, you need to ensure that your plugins are also built in release + mode. By default, if a debug build of Qt is available, plugins will \e only be built in debug + mode. To force the plugins to be built in release mode, add the following line to the plugin's + project (\c{.pro}) file: \code CONFIG += release \endcode - This will ensure that the plugin is compatible with the version of the library - used in the application. + This ensures that the plugin is compatible with the version of the library used in the + application. \section1 Debugging Plugins - There are a number of issues that may prevent correctly-written plugins from - working with the applications that are designed to use them. Many of these - are related to differences in the way that plugins and applications have been - built, often arising from separate build systems and processes. + There are a number of issues that may prevent correctly-written plugins from working with the + applications that are designed to use them. Many of these are related to differences in the way + that plugins and applications have been built, often arising from separate build systems and + processes. + + To obtain diagnostic information from Qt, about each plugin it tries to load, use the + \c QT_DEBUG_PLUGINS environment variable. Set this variable to a non-zero value in the + environment where your application is launched. - The following table contains descriptions of the common causes of problems - developers experience when creating plugins: + The following table describes the common causes of problems developers experience when creating + plugins and possible solutions. \table - \header \li Problem \li Cause \li Solution - \row \li Plugins sliently fail to load even when opened directly by the - application. \QD shows the plugin libraries in its - \gui{Help|About Plugins} dialog, but no plugins are listed under each - of them. - \li The application and its plugins are built in different modes. - \li Either share the same build information or build the plugins in both - debug and release modes by appending the \c debug_and_release to - the \l{qmake Variable Reference#CONFIG}{CONFIG} variable in each of - their project files. + \header + \li Problem \li Cause \li Solution + \row + \li Plugins sliently fail to load even when opened directly by the application. + \QD shows the plugin libraries in its \uicontrol{Help|About Plugins} dialog, but no + plugins are listed under each of them. + \li The application and its plugins are built in different modes. + \li Either share the same build information or build the plugins in both debug and release + modes by appending the \c debug_and_release to the + \l{qmake Variable Reference#CONFIG}{CONFIG} variable in each of their project files. \endtable - You can also use the \c QT_DEBUG_PLUGINS environment variable to obtain - diagnostic information from Qt about each plugin it tries to load. Set this - variable to a non-zero value in the environment from which your application is - launched. */ -- cgit v1.2.3 From 1715eeed9972fbe2b72562e7bc1015695927bf7c Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 12 Sep 2019 11:38:51 +0200 Subject: Add qwasm to the list of QPA plugins Change-Id: I2e156423c81fde3c5cb8a566e1e10e088fe5d745 Reviewed-by: Alessandro Portale --- doc/src/platforms/qpa.qdoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/platforms/qpa.qdoc b/doc/src/platforms/qpa.qdoc index 1abedebe7..3663ed4dd 100644 --- a/doc/src/platforms/qpa.qdoc +++ b/doc/src/platforms/qpa.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -161,6 +161,10 @@ The following table summarizes the platform plugins available for QPA: \li \c qvnc \li QVncIntegration \li VNC support +\row + \li \c qwasm + \li QWasmIntegration + \li \l{Qt for WebAssembly}{WebAssembly support} \row \li \c qwayland \li \list -- cgit v1.2.3 From 01fd6b4745fa6675c87494b9f4ad19b3fb7a2781 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 12 Sep 2019 11:14:13 +0200 Subject: Edit info on Qt for WebAssembly Mention that you have to check out Emscripten SDK and use the version for Qt 5.13 in the example. Change-Id: I2f56c6ebf08bfbd1828c8967be5872eef943d5d4 Reviewed-by: Lorn Potter --- doc/src/platforms/webasm.qdoc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/src/platforms/webasm.qdoc b/doc/src/platforms/webasm.qdoc index 1aa9c62cf..20aaf8f07 100644 --- a/doc/src/platforms/webasm.qdoc +++ b/doc/src/platforms/webasm.qdoc @@ -27,7 +27,7 @@ /*! \page wasm.html \title Qt for WebAssembly -\brief Runs Qt applications in a secure sandbox in the browser +\brief Runs Qt applications in a secure sandbox in the browser. \ingroup supportedplatform @@ -44,10 +44,13 @@ resource usage. \section2 Install Emscripten -\l{https://emscripten.org/docs/introducing_emscripten/index.html}{emscripten} is a toolchain for compiling to asm.js and Webassembly. +\l{https://emscripten.org/docs/introducing_emscripten/index.html}{emscripten} +is a toolchain for compiling to asm.js and WebAssembly. It lets you run Qt on the web at near-native speed without plugins. -Refer to the \l{http://kripken.github.io/emscripten-site/docs/getting_started/index.html}{emscripten documentation} for the installation procedure. +Refer to the \l{http://kripken.github.io/emscripten-site/docs/getting_started/index.html} +{emscripten documentation} for more information about checking out the +Emscripten SDK and installing and activating Emscripten for your Qt version. After installation, you should have emscripten in your path. Check this with the following command: @@ -65,10 +68,11 @@ The known-good versions are: \li Qt 5.13: 1.38.27 (multithreading: 1.38.30) \endlist -Use \c emsdk to install specific \c emscripten versions: +Use \c emsdk to install specific \c emscripten versions. For example, to install +it for Qt 5.13, enter: \list - \li ./emsdk install sdk-1.38.16-64bit - \li ./emsdk activate --embedded sdk-1.38.16-64bit + \li ./emsdk install sdk-1.38.27-64bit + \li ./emsdk activate --embedded sdk-1.38.27-64bit \endlist The \c --embedded option is useful if you want to install multiple versions of the SDK. -- cgit v1.2.3 From 697a9f20eb7681a846409fed0ed68b424de1280e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 12 Sep 2019 17:14:25 +0200 Subject: Explain that "supported platform" does not mean package in Qt installer Fixes: QTBUG-64623 Change-Id: I41c4be9ba8463851b670f8c81b7225ae9271a257 Reviewed-by: Paul Wicking --- doc/src/platforms/supported-platforms.qdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 46af032bc..b2e6cffd4 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -88,6 +88,10 @@ You can download the Qt 5 installers and source packages from the \l Downloads page. For more information, visit the \l{Getting Started with Qt} page. + \note All the supported configurations are not provided as binary packages + in the Qt installer. However, the intention is to provide the most widely-used + reference configurations for the developer's convenience. + \section2 Exceptions Individual modules might be available only on some platforms, or they might not support all configurations. For example, as Qt \WebEngine has Chromium -- cgit v1.2.3 From 0b1ecbf29aa8ec299ad49b01af93d50cbb456730 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 13 Sep 2019 10:00:21 +0200 Subject: Edit info about the configuration system Remove an obsolete note and move the description of the -developer-build option to its own section, now that it is not mentioned in the topic about -prefix builds any more. Fixes: QTBUG-63017 Change-Id: Icd4f4477278990bb76b8862a6c0b5632090095bf Reviewed-by: Paul Wicking --- doc/src/configure.qdoc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/src/configure.qdoc b/doc/src/configure.qdoc index 5389fcc13..a6517bbb7 100644 --- a/doc/src/configure.qdoc +++ b/doc/src/configure.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -80,15 +80,6 @@ make install \endcode - \note The 'make install' step is required only if Qt is configured with a - \e -prefix, which is the default on Unix-based platforms unless the - \e -developer-build configure option is used. On Windows, Qt is configured - as a non-prefix build by default. - - \note The \c -developer-build is meant for developing Qt and not for - shipping applications. Such a build contains more exported symbols than - a standard build and compiles with a higher warning level. - \section1 Modules and Features Qt consists of different \l{All Modules}{modules} whose sources can be @@ -281,4 +272,10 @@ dynamically switch between the available options at runtime. For more details about the benefits of using dynamic GL-switching, see \l{Graphics Drivers}. + + \section1 Developer Builds + + The \c -developer-build option is not meant for shipping applications, + but can be used for developing Qt. Such a build contains more exported + symbols than a standard build and compiles with a higher warning level. */ -- cgit v1.2.3 From 8d14f08eaef956dba22fac12c021517d2d811c9c Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 13 Sep 2019 15:17:22 +0200 Subject: I18N: Delete obsolete information about using QPainter::drawText() Rewrite the remaining text to accommodate the fact that there is only one bullet point left. Fixes: QTBUG-65948 Change-Id: I114ed2709e8000f3f0c6b45f7f5b0978e3c640bc Reviewed-by: Eskil Abrahamsen Blomfeldt --- doc/src/internationalization/i18n.qdoc | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc index a56eabeab..2419906d8 100644 --- a/doc/src/internationalization/i18n.qdoc +++ b/doc/src/internationalization/i18n.qdoc @@ -151,27 +151,14 @@ Support for these writing systems is transparent to the programmer and completely encapsulated in \l{Rich Text Processing}{Qt's text engine}. - This means that you don't need to have any knowledge about the writing - system used in a particular language, except for the following small points: - - \list - - \li QPainter::drawText(int x, int y, const QString &str) will always - draw the string with its left edge at the position specified with - the x, y parameters. This will usually give you left aligned strings. - Arabic and Hebrew application strings are usually right - aligned, so for these languages use the version of drawText() that - takes a QRect since this will align in accordance with the language. - - \li When you write your own text input controls, use QTextLayout. - In some languages (e.g. Arabic or languages from the Indian - subcontinent), the width and shape of a glyph changes depending on the - surrounding characters, which QTextLayout takes into account. - Writing input controls usually requires a certain knowledge of the - scripts it is going to be used in. Usually the easiest way is to - subclass QLineEdit or QTextEdit. - - \endlist + This means that you don't usually need to have any knowledge of the writing + system used in a particular language, unless you want to write your own text + input controls. In some languages, such as Arabic or languages from the + Indian subcontinent, the width and shape of a glyph changes depending on the + surrounding characters. To take this into account, use QTextLayout. + Writing input controls also requires some knowledge of the scripts they are + going to be used in. Usually, the easiest way is to subclass QLineEdit or + QTextEdit. For more information about how to internationalize source code, see \l{Writing Source Code for Translation} and -- cgit v1.2.3 From 530a73a82518543e1432cf439dda5e0305e1224b Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 16 Sep 2019 09:45:14 +0200 Subject: Android: Add Android 9 to supported platforms Fixes: QTBUG-78204 Change-Id: I02d5242b2e55a4739cbaa20aa48dd7600645ca2a Reviewed-by: Eskil Abrahamsen Blomfeldt --- doc/src/platforms/supported-platforms.qdocinc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/platforms/supported-platforms.qdocinc b/doc/src/platforms/supported-platforms.qdocinc index 8a8ab8f5c..7e05bd74e 100644 --- a/doc/src/platforms/supported-platforms.qdocinc +++ b/doc/src/platforms/supported-platforms.qdocinc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -100,10 +100,11 @@ //! [android] \table 80% \header \li Platform Version \li Architecture \li Compiler \li Build Environment - \row \li Android 5, 6, 7, 8 (API Level 21) - \li \c armv7 and \c x86 + \row \li Android 5.0 or later (that is, API Level 21 and up) + \li \c armv7a and \c x86, \c arm64-v8 and \c x86_64 \li \b {Clang as provided by Google}, \b {MinGW 7.3} - \li \b {RHEL 7.x (x86_64)}, \b{\macos 10.13}, \b {Windows 7 (x86_64)} + \li \b {RHEL 7.x (x86_64)}, \b{\macos 10.13}, \b {Windows 7 (x86_64)}, + \b {Windows 10} \endtable //! [android] -- cgit v1.2.3 From 37e2fe2b4cc70a85c9cdaccdd94d2284864290ba Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 6 Aug 2019 12:03:04 +0200 Subject: CMake: Move documentation into separate project We've now four pages, which logically belong together. So let's move them into one 'qtcmake' module. Change-Id: I3015fc0804d62bcaec2cfbb6b84c6c08fe5f43f8 Reviewed-by: Alexandru Croitor --- doc/config/qtdoc.qdocconf | 6 +- doc/src/cmake/cmake-manual.qdoc | 225 ++++++++++++++++++++++++++++ doc/src/cmake/cmake.pro | 9 ++ doc/src/cmake/qtcmake.qdocconf | 39 +++++ doc/src/cmake/snippets/cmake/examples.cmake | 48 ++++++ doc/src/development/cmake-manual.qdoc | 225 ---------------------------- doc/src/snippets/cmake/examples.cmake | 48 ------ qtdoc.pro | 8 +- 8 files changed, 332 insertions(+), 276 deletions(-) create mode 100644 doc/src/cmake/cmake-manual.qdoc create mode 100644 doc/src/cmake/cmake.pro create mode 100644 doc/src/cmake/qtcmake.qdocconf create mode 100644 doc/src/cmake/snippets/cmake/examples.cmake delete mode 100644 doc/src/development/cmake-manual.qdoc delete mode 100644 doc/src/snippets/cmake/examples.cmake diff --git a/doc/config/qtdoc.qdocconf b/doc/config/qtdoc.qdocconf index 4883371a6..584b95ee3 100644 --- a/doc/config/qtdoc.qdocconf +++ b/doc/config/qtdoc.qdocconf @@ -11,6 +11,7 @@ moduleheader = depends += \ activeqt \ + qtcmake \ qdoc \ qmake \ qtandroidextras \ @@ -85,9 +86,10 @@ exampledirs += \ ../snippets \ ../../examples -# Don't parse files in snippets directory +# Don't parse files in snippets and cmake directories excludedirs += \ - ../src/snippets + ../src/snippets \ + ../src/cmake examplesinstallpath = diff --git a/doc/src/cmake/cmake-manual.qdoc b/doc/src/cmake/cmake-manual.qdoc new file mode 100644 index 000000000..ebd18593a --- /dev/null +++ b/doc/src/cmake/cmake-manual.qdoc @@ -0,0 +1,225 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** 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$ +** +****************************************************************************/ + +/*! + \page cmake-manual.html + \target CMake Manual + \title Build with CMake + \brief Describes how to use CMake in your development projects. + \nextpage Get started with CMake + + \c{CMake} is a tool to simplify the build process for development projects across different + platforms. \c CMake automatically generates build systems, such as Makefiles and Visual Studio + project files. + + \c{CMake} is a 3rd party tool with its own \l{CMake Documentation}{documentation}. This topic + describes how to use \c{CMake} 3.1.0 with Qt 5. + + + \section1 Table of Contents + + \list + \li \l{Get started with CMake} + \list + \li \l{Build a GUI executable} + \li \l{Imported targets} + \endlist + \li \l{CMake Variable Reference} + \list + \li \l{Module variables} + \li \l{Installation variables} + \endlist + \li \l{CMake Command Reference} + \list + \li \l{Qt5::Core} + \li \l{Qt5::Widgets} + \li \l{Qt5::DBus} + \li \l{Qt5::LinguistTools} + \endlist + \endlist +*/ + +/*! + \page cmake-get-started.html + \title Get started with CMake + \previouspage Build with CMake + \nextpage CMake Variable Reference + + Start with \c{find_package} to locate the libraries and header files shipped with Qt. Then, you + can use these libraries and header files with the \c{target_link_libraries} command to build + Qt-based libraries and applications. This command automatically adds the appropriate include + directories, compile definitions, the position-independent-code flag, and links to the + \c qtmain.lib library on Windows, for example. + + \section2 Build a GUI executable + + To build a helloworld GUI executable, you need the following: + + \snippet snippets/cmake/examples.cmake 0 + + For \c{find_package} to be successful, \c CMake must find the Qt installation in one of the + following ways: + \list 1 + \li Set your \c CMAKE_PREFIX_PATH environment variable to the Qt 5 installation prefix. + This is the recommended way. + \li Set the \c{Qt5_DIR} in the \c CMake cache to the location of the \c{Qt5Config.cmake} + file. + \endlist + + The \c CMAKE_AUTOMOC setting runs moc automatically when required. For more details, see + \l{CMake AUTOMOC documentation}. + + \section2 Imported targets + + Imported targets are created for each Qt module. In \c{CMake}, commands such as + \c{target_link_libraries} use imported target names instead of variables like + \c{Qt5_LIBRARIES}. The actual path to the library can be obtained using the + \l{CMake LOCATION Documentation}{LOCATION property}, as follows: + + \snippet snippets/cmake/examples.cmake 1 + + However, you rarely need the full location to the library as most \c{CMake} APIs can locate + imported targets and use them automatically, instead of the full path. For this purpose, each + module in Qt 5 has a library target with the \b{Qt5::} naming convention. + + Imported targets are created with the same configurations as when Qt was configured. That is: + \list + \li If Qt was configured with the \c -debug switch, an imported target with the DEBUG + configuration is created. + \li If Qt was configured with the \c -release switch, an imported target with the RELEASE + configuration is created. + \li If Qt was configured with the \c -debug-and-release switch, which is the default on + Windows, then imported targets are created with both RELEASE and DEBUG configurations. + \endlist + + If your project has custom \c{CMake} build configurations, you have to map your custom + configuration to either the debug or the release Qt configuration. + + \snippet snippets/cmake/examples.cmake 2 + + In \c{CMake}, plugins are also available as \c IMPORTED targets. The \l{Qt Network}, \l{Qt SQL}, + \l{Qt GUI}, and \l{Qt Widgets} modules have plugins associated. They provide a list of plugins + in the \c{Qt5}\e{}\c{_PLUGINS} variable. + + \snippet snippets/cmake/examples.cmake 5 + +*/ + +/*! + \page cmake-variable-reference.html + \title CMake Variable Reference + \brief Provides a complete reference for CMake variables implemented in Qt. + \contentspage Build with CMake + \nextpage CMake Command Reference + \previouspage Build with CMake + + \section1 Module variables + + When you use \c{find_package}, the resulting imported targets are created for use with + \c{target_link_libraries}. Some variables are populated with information required to configure + the build. For each module, the name of its imported target matches the name of the module with + a "Qt5::" prefix, such as "Qt5::Widgets". All of the package-specific variables have a + consistent name with its package name as prefix. + + For example, \c{find_package(Qt5 COMPONENTS Widgets)}, when successful, makes the following + variables available: + + \table + \header + \li Variable + \li Description + \row + \li \c Qt5Widgets_VERSION + \li A string that describes the module's version. + \row + \li \c Qt5Widgets_LIBRARIES + \li A list of libraries for use with the \c target_link_libraries command. + \row + \li \c Qt5Widgets_INCLUDE_DIRS + \li A list of directories for use with the \c include_directories command. + \row + \li \c Qt5Widgets_DEFINITIONS + \li A list of definitions for use with the \c add_definitions command. + \row + \li \c Qt5Widgets_COMPILE_DEFINITIONS + \li A list of definitions for use with the \c COMPILE_DEFINITIONS target property. + \row + \li \c Qt5Widgets_FOUND + \li A boolean that describes whether the module was found successfully. + \row + \li \c Qt5Widgets_EXECUTABLE_COMPILE_FLAGS + \li A string of flags to use when building executables. + \endtable + + For all packages found with \c{find_package}, equivalents of these variables are available; + they are case-sensitive. + + \section1 Installation variables + + Additionally, there are also variables that don't relate to a particular package, but to the + Qt installation itself. + + \table + \header + \li Variable + \li Description + \row + \li \c QT_VISIBILITY_AVAILABLE + \li On Unix, a boolean that describes whether Qt libraries and plugins were compiled + with \c{-fvisibility=hidden}. This means that only selected symbols are exported. + \row + \li \c QT_LIBINFIX + \li A string that holds the infix used in library names, when Qt is configured with + \c{-libinfix}. + \endtable + +*/ + +/*! + \page cmake-command-reference.html + \title CMake Command Reference + \brief Provides a complete reference for CMake commands implemented in Qt. + \contentspage Build with CMake + \previouspage CMake Variable Reference + + \section2 Qt5::Core + + \annotatedlist cmake-macros-qtcore + + \section2 Qt5::Widgets + + \annotatedlist cmake-macros-qtwidgets + + \section2 Qt5::DBus + + \annotatedlist cmake-commands-qtdbus + + \section2 Qt5::LinguistTools + + \annotatedlist cmake-macros-qtlinguisttools +*/ + diff --git a/doc/src/cmake/cmake.pro b/doc/src/cmake/cmake.pro new file mode 100644 index 000000000..3fd95bd29 --- /dev/null +++ b/doc/src/cmake/cmake.pro @@ -0,0 +1,9 @@ +TEMPLATE = aux + +QMAKE_DOCS = $$PWD/qtcmake.qdocconf + +QTDIR = $$[QT_HOST_PREFIX] +exists($$QTDIR/.qmake.cache): \ + QMAKE_DOCS_OUTPUTDIR = $$QTDIR/doc/cmake +else: \ + QMAKE_DOCS_OUTPUTDIR = $$OUT_PWD/cmake diff --git a/doc/src/cmake/qtcmake.qdocconf b/doc/src/cmake/qtcmake.qdocconf new file mode 100644 index 000000000..a2b36ba1c --- /dev/null +++ b/doc/src/cmake/qtcmake.qdocconf @@ -0,0 +1,39 @@ +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) +include($QT_INSTALL_DOCS/global/externalsites.qdocconf) + +project = QtCMake +description = Using Qt with CMake +version = $QT_VERSION + +qhp.projects = qtcmake + +qhp.qtcmake.file = qtcmake.qhp +qhp.qtcmake.namespace = org.qt-project.qtcmake.$QT_VERSION_TAG +qhp.qtcmake.virtualFolder = qtcmake +qhp.qtcmake.indexTitle = Using Qt with CMake +qhp.qtcmake.filterAttributes = qt $QT_VERSION tools cmake +qhp.qtcmake.customFilters.qtcmake.name = Build with CMake +qhp.qtcmake.customFilters.qtcmake.filterAttributes = qt tools cmake +qhp.qtcmake.subprojects = manual +qhp.qtcmake.subprojects.manual.title = Manual +qhp.qtcmake.subprojects.manual.indexTitle = Build with CMake +qhp.qtcmake.subprojects.manual.selectors = fake:page + +sources = cmake-manual.qdoc + +exampledirs = . + +# Instruct Clang not to look for a module header +moduleheader = + +depends += \ + qtdoc \ + qtcore \ + qtnetwork \ + qtsql \ + qtgui \ + qtwidgets \ + qtdbus \ + qtlinguist + +navigation.landingpage = "Build with CMake" diff --git a/doc/src/cmake/snippets/cmake/examples.cmake b/doc/src/cmake/snippets/cmake/examples.cmake new file mode 100644 index 000000000..264f3c05d --- /dev/null +++ b/doc/src/cmake/snippets/cmake/examples.cmake @@ -0,0 +1,48 @@ +#! [0] +cmake_minimum_required(VERSION 3.1.0) + +project(helloworld) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(CMAKE_VERSION VERSION_LESS "3.7.0") + set(CMAKE_INCLUDE_CURRENT_DIR ON) +endif() + +find_package(Qt5 COMPONENTS Widgets REQUIRED) + +add_executable(helloworld + mainwindow.ui + mainwindow.cpp + main.cpp + resources.qrc +) + +target_link_libraries(helloworld Qt5::Widgets) +#! [0] + +#! [1] +find_package(Qt5 COMPONENTS Core REQUIRED) + +get_target_property(QtCore_location Qt5::Core LOCATION) +#! [1] + +#! [2] +find_package(Qt5 COMPONENTS Core REQUIRED) + +set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage") + +# set up a mapping so that the Release configuration for the Qt imported target is +# used in the COVERAGE CMake configuration. +set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE "RELEASE") +#! [2] + +#! [5] +foreach(plugin ${Qt5Network_PLUGINS}) + get_target_property(_loc ${plugin} LOCATION) + message("Plugin ${plugin} is at location ${_loc}") +endforeach() +#! [5] + diff --git a/doc/src/development/cmake-manual.qdoc b/doc/src/development/cmake-manual.qdoc deleted file mode 100644 index ebd18593a..000000000 --- a/doc/src/development/cmake-manual.qdoc +++ /dev/null @@ -1,225 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** 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$ -** -****************************************************************************/ - -/*! - \page cmake-manual.html - \target CMake Manual - \title Build with CMake - \brief Describes how to use CMake in your development projects. - \nextpage Get started with CMake - - \c{CMake} is a tool to simplify the build process for development projects across different - platforms. \c CMake automatically generates build systems, such as Makefiles and Visual Studio - project files. - - \c{CMake} is a 3rd party tool with its own \l{CMake Documentation}{documentation}. This topic - describes how to use \c{CMake} 3.1.0 with Qt 5. - - - \section1 Table of Contents - - \list - \li \l{Get started with CMake} - \list - \li \l{Build a GUI executable} - \li \l{Imported targets} - \endlist - \li \l{CMake Variable Reference} - \list - \li \l{Module variables} - \li \l{Installation variables} - \endlist - \li \l{CMake Command Reference} - \list - \li \l{Qt5::Core} - \li \l{Qt5::Widgets} - \li \l{Qt5::DBus} - \li \l{Qt5::LinguistTools} - \endlist - \endlist -*/ - -/*! - \page cmake-get-started.html - \title Get started with CMake - \previouspage Build with CMake - \nextpage CMake Variable Reference - - Start with \c{find_package} to locate the libraries and header files shipped with Qt. Then, you - can use these libraries and header files with the \c{target_link_libraries} command to build - Qt-based libraries and applications. This command automatically adds the appropriate include - directories, compile definitions, the position-independent-code flag, and links to the - \c qtmain.lib library on Windows, for example. - - \section2 Build a GUI executable - - To build a helloworld GUI executable, you need the following: - - \snippet snippets/cmake/examples.cmake 0 - - For \c{find_package} to be successful, \c CMake must find the Qt installation in one of the - following ways: - \list 1 - \li Set your \c CMAKE_PREFIX_PATH environment variable to the Qt 5 installation prefix. - This is the recommended way. - \li Set the \c{Qt5_DIR} in the \c CMake cache to the location of the \c{Qt5Config.cmake} - file. - \endlist - - The \c CMAKE_AUTOMOC setting runs moc automatically when required. For more details, see - \l{CMake AUTOMOC documentation}. - - \section2 Imported targets - - Imported targets are created for each Qt module. In \c{CMake}, commands such as - \c{target_link_libraries} use imported target names instead of variables like - \c{Qt5_LIBRARIES}. The actual path to the library can be obtained using the - \l{CMake LOCATION Documentation}{LOCATION property}, as follows: - - \snippet snippets/cmake/examples.cmake 1 - - However, you rarely need the full location to the library as most \c{CMake} APIs can locate - imported targets and use them automatically, instead of the full path. For this purpose, each - module in Qt 5 has a library target with the \b{Qt5::} naming convention. - - Imported targets are created with the same configurations as when Qt was configured. That is: - \list - \li If Qt was configured with the \c -debug switch, an imported target with the DEBUG - configuration is created. - \li If Qt was configured with the \c -release switch, an imported target with the RELEASE - configuration is created. - \li If Qt was configured with the \c -debug-and-release switch, which is the default on - Windows, then imported targets are created with both RELEASE and DEBUG configurations. - \endlist - - If your project has custom \c{CMake} build configurations, you have to map your custom - configuration to either the debug or the release Qt configuration. - - \snippet snippets/cmake/examples.cmake 2 - - In \c{CMake}, plugins are also available as \c IMPORTED targets. The \l{Qt Network}, \l{Qt SQL}, - \l{Qt GUI}, and \l{Qt Widgets} modules have plugins associated. They provide a list of plugins - in the \c{Qt5}\e{}\c{_PLUGINS} variable. - - \snippet snippets/cmake/examples.cmake 5 - -*/ - -/*! - \page cmake-variable-reference.html - \title CMake Variable Reference - \brief Provides a complete reference for CMake variables implemented in Qt. - \contentspage Build with CMake - \nextpage CMake Command Reference - \previouspage Build with CMake - - \section1 Module variables - - When you use \c{find_package}, the resulting imported targets are created for use with - \c{target_link_libraries}. Some variables are populated with information required to configure - the build. For each module, the name of its imported target matches the name of the module with - a "Qt5::" prefix, such as "Qt5::Widgets". All of the package-specific variables have a - consistent name with its package name as prefix. - - For example, \c{find_package(Qt5 COMPONENTS Widgets)}, when successful, makes the following - variables available: - - \table - \header - \li Variable - \li Description - \row - \li \c Qt5Widgets_VERSION - \li A string that describes the module's version. - \row - \li \c Qt5Widgets_LIBRARIES - \li A list of libraries for use with the \c target_link_libraries command. - \row - \li \c Qt5Widgets_INCLUDE_DIRS - \li A list of directories for use with the \c include_directories command. - \row - \li \c Qt5Widgets_DEFINITIONS - \li A list of definitions for use with the \c add_definitions command. - \row - \li \c Qt5Widgets_COMPILE_DEFINITIONS - \li A list of definitions for use with the \c COMPILE_DEFINITIONS target property. - \row - \li \c Qt5Widgets_FOUND - \li A boolean that describes whether the module was found successfully. - \row - \li \c Qt5Widgets_EXECUTABLE_COMPILE_FLAGS - \li A string of flags to use when building executables. - \endtable - - For all packages found with \c{find_package}, equivalents of these variables are available; - they are case-sensitive. - - \section1 Installation variables - - Additionally, there are also variables that don't relate to a particular package, but to the - Qt installation itself. - - \table - \header - \li Variable - \li Description - \row - \li \c QT_VISIBILITY_AVAILABLE - \li On Unix, a boolean that describes whether Qt libraries and plugins were compiled - with \c{-fvisibility=hidden}. This means that only selected symbols are exported. - \row - \li \c QT_LIBINFIX - \li A string that holds the infix used in library names, when Qt is configured with - \c{-libinfix}. - \endtable - -*/ - -/*! - \page cmake-command-reference.html - \title CMake Command Reference - \brief Provides a complete reference for CMake commands implemented in Qt. - \contentspage Build with CMake - \previouspage CMake Variable Reference - - \section2 Qt5::Core - - \annotatedlist cmake-macros-qtcore - - \section2 Qt5::Widgets - - \annotatedlist cmake-macros-qtwidgets - - \section2 Qt5::DBus - - \annotatedlist cmake-commands-qtdbus - - \section2 Qt5::LinguistTools - - \annotatedlist cmake-macros-qtlinguisttools -*/ - diff --git a/doc/src/snippets/cmake/examples.cmake b/doc/src/snippets/cmake/examples.cmake deleted file mode 100644 index 264f3c05d..000000000 --- a/doc/src/snippets/cmake/examples.cmake +++ /dev/null @@ -1,48 +0,0 @@ -#! [0] -cmake_minimum_required(VERSION 3.1.0) - -project(helloworld) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(CMAKE_VERSION VERSION_LESS "3.7.0") - set(CMAKE_INCLUDE_CURRENT_DIR ON) -endif() - -find_package(Qt5 COMPONENTS Widgets REQUIRED) - -add_executable(helloworld - mainwindow.ui - mainwindow.cpp - main.cpp - resources.qrc -) - -target_link_libraries(helloworld Qt5::Widgets) -#! [0] - -#! [1] -find_package(Qt5 COMPONENTS Core REQUIRED) - -get_target_property(QtCore_location Qt5::Core LOCATION) -#! [1] - -#! [2] -find_package(Qt5 COMPONENTS Core REQUIRED) - -set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage") - -# set up a mapping so that the Release configuration for the Qt imported target is -# used in the COVERAGE CMake configuration. -set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE "RELEASE") -#! [2] - -#! [5] -foreach(plugin ${Qt5Network_PLUGINS}) - get_target_property(_loc ${plugin} LOCATION) - message("Plugin ${plugin} is at location ${_loc}") -endforeach() -#! [5] - diff --git a/qtdoc.pro b/qtdoc.pro index 14c8c21de..bb9dc7024 100644 --- a/qtdoc.pro +++ b/qtdoc.pro @@ -1,3 +1,9 @@ load(qt_parts) -SUBDIRS += doc +cmake.file = doc/src/cmake/cmake.pro + +doc.file = doc/doc.pro +doc.depends = cmake + +SUBDIRS += doc cmake + -- cgit v1.2.3 From d952a1c09db2d5faf3de6c2b1e5218b26246e6d2 Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Wed, 18 Sep 2019 18:35:16 +0200 Subject: Doc: Drop platform/API version in introduction paragraph The platform/API version is maintained in the table that follows immediately after the introduction paragraph. Fixes: QTBUG-78489 Change-Id: Ib22e77519973b87b9462ac5940bc5d2250398b47 Reviewed-by: Leena Miettinen --- doc/src/platforms/android.qdoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/platforms/android.qdoc b/doc/src/platforms/android.qdoc index 78136e5f2..b35de320a 100644 --- a/doc/src/platforms/android.qdoc +++ b/doc/src/platforms/android.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -31,12 +31,12 @@ \brief Provides information about Android support in Qt. \ingroup supportedplatform -Qt for Android enables you to run Qt 5 applications on devices with Android -v4.1 (API level 16) or later. All Qt modules (essential and add-on) are -supported except Qt \WebEngine, Qt Serial Port, and the -platform-specific ones (Qt Mac Extras, Qt Windows Extras, and Qt X11 Extras). +Qt for Android enables you to run Qt 5 applications Android devices. +All Qt modules (essential and add-on) are supported except Qt \WebEngine, +Qt Serial Port, and the platform-specific ones (Qt Mac Extras, +Qt Windows Extras, and Qt X11 Extras). -The following configurations are supported. +The following configurations are supported: \include supported-platforms.qdocinc android -- cgit v1.2.3 From a7bacc5e4b357ef3b0d8901963c5f7bb1462720b Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 18 Sep 2019 14:42:21 +0200 Subject: UWP: Replace WinRT with UWP where possible It is still used in the name of the QPA plugin, the plugin class, and runner tool. Fixes: QTBUG-61884 Change-Id: I1ac154afbe59b590d65ed174a6598150ef2429b1 Reviewed-by: Maurice Kalinowski Reviewed-by: Paul Wicking --- doc/src/configure.qdoc | 2 +- doc/src/getting-started/gettingstarted.qdoc | 4 +- doc/src/getting-started/installation.qdoc | 6 +- doc/src/platforms/qpa.qdoc | 5 +- doc/src/platforms/supported-platforms.qdocinc | 3 +- doc/src/platforms/windows.qdoc | 4 +- doc/src/platforms/winrt.qdoc | 88 +++++++++++---------------- doc/src/qt5-intro.qdoc | 7 +-- doc/src/qtmodules.qdoc | 6 +- doc/src/whatsnew/whatsnew53.qdoc | 3 +- doc/src/whatsnew/whatsnew54.qdoc | 8 +-- 11 files changed, 60 insertions(+), 76 deletions(-) diff --git a/doc/src/configure.qdoc b/doc/src/configure.qdoc index a6517bbb7..6767e3e9a 100644 --- a/doc/src/configure.qdoc +++ b/doc/src/configure.qdoc @@ -225,7 +225,7 @@ \list \li \l{Building Qt 5 for Android} Wiki page \li \l{Qt for iOS - Building from Source} - \li \l{Qt for WinRT#Building from source}{Qt for WinRT - Building from Source} + \li \l{Qt for UWP#Building from source}{Qt for UWP - Building from Source} \li \l{Configure an Embedded Linux Device} \li \l{http://wiki.qt.io/Qt_RaspberryPi}{Qt for Raspberry Pi} - a community-driven site for Raspberry devices diff --git a/doc/src/getting-started/gettingstarted.qdoc b/doc/src/getting-started/gettingstarted.qdoc index cffa9123d..0102f7113 100644 --- a/doc/src/getting-started/gettingstarted.qdoc +++ b/doc/src/getting-started/gettingstarted.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -100,7 +100,7 @@ \li \l{Qt for Windows}{Windows} \li \l{Qt for Linux/X11}{Linux/X11} \li \l{Qt for macOS}{\macos} - \li \l{Qt for WinRT}{Windows Runtime} + \li \l{Qt for UWP}{Universal Windows Platform} \endlist For more information, visit the \l{Supported Platforms} diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index cc57337c2..b5c236519 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -93,9 +93,9 @@ visit the following page: \li \l {Qt for iOS - Building from Source} \endlist -\section1 WinRT +\section1 Universal Windows Platform (UWP) \list -\li \l {Qt for WinRT#Building from source}{Qt for WinRT - Building from Source} +\li \l {Qt for UWP#Building from source}{Qt for UWP - Building from Source} \endlist */ diff --git a/doc/src/platforms/qpa.qdoc b/doc/src/platforms/qpa.qdoc index 3663ed4dd..7719ce949 100644 --- a/doc/src/platforms/qpa.qdoc +++ b/doc/src/platforms/qpa.qdoc @@ -182,7 +182,10 @@ The following table summarizes the platform plugins available for QPA: \row \li \c qwinrt \li QWinRTIntegrationPlugin - \li \l{Qt for WinRT}{WinRT and Windows Phone support} + \li \l{Qt for UWP}{Universal Windows Platform (UWP) support} + \note This plugin was originally written for \WinRT (Windows Runtime), + and is therefore called \c qwinrt. + \row \li \c qxcb \li QXcbIntegrationPlugin diff --git a/doc/src/platforms/supported-platforms.qdocinc b/doc/src/platforms/supported-platforms.qdocinc index 7e05bd74e..28ff7548c 100644 --- a/doc/src/platforms/supported-platforms.qdocinc +++ b/doc/src/platforms/supported-platforms.qdocinc @@ -127,7 +127,7 @@ \endtable //! [ios] -\section2 \l{Qt for WinRT}{WinRT} +\section2 \l{Qt for UWP}{Universal Windows Platform (UWP)} //! [winrt] \table 80% \header \li Platform Version \li Architecture \li Compiler \li Build Environment @@ -140,7 +140,6 @@ \br Universal Windows Platforms include Windows 10, Windows 10 IoT devices, Xbox One, and HoloLens. - //! [winrt] //! [mobile] diff --git a/doc/src/platforms/windows.qdoc b/doc/src/platforms/windows.qdoc index 98f480cfb..76bf4be7e 100644 --- a/doc/src/platforms/windows.qdoc +++ b/doc/src/platforms/windows.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -597,7 +597,7 @@ process of creating a deployable folder containing the \l{Qt}-related dependencies (libraries, QML imports, plugins, and translations) required to run the application from that folder. - It creates a sandbox for \l{Qt for WinRT}{Windows Runtime} + It creates a sandbox for \l{Qt for UWP}{Universal Windows Platform (UWP)} or an installation tree for Windows desktop applications, which can be easily bundled into an installation package. diff --git a/doc/src/platforms/winrt.qdoc b/doc/src/platforms/winrt.qdoc index 99264f7ad..fce050279 100644 --- a/doc/src/platforms/winrt.qdoc +++ b/doc/src/platforms/winrt.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -27,22 +27,24 @@ /*! \page winrt_support.html - \title Qt for WinRT - \brief Provides insight into Qt's WinRT port and how to use it. + \title Qt for UWP + \brief Running Qt applications on devices supporting the + Universal Windows Platform (UWP). \ingroup supportedplatform - Qt for WinRT allows you to run Qt applications on devices supporting the - Windows Store App APIs. This covers Modern UI applications on Windows 10, - Windows 10 Mobile and Windows 10 IoT. + Qt for UWP allows you to run Qt applications on devices supporting the + Universal Windows Platform (UWP). Microsoft Windows 10 introduced UWP, which + provides a common application platform on every device that runs Windows 10, + as a successor to Windows Runtime (WinRT) introduced by Windows 8. The UWP + core APIs are the same on all Windows devices, and therefore applications + that only use the core APIs will run on any Windows 10 device, such as a + desktop PC, or Xbox One. - Microsoft introduced a new design paradigm with the Windows 8 Modern UI. A - core part of this new approach is Windows Runtime (WinRT) that supports - development using different programming languages, such as C++/CX (component - extensions), C# VB.NET, or JavaScript. The Qt port uses the C++ - capabilities. While WinRT supports the component extensions internally, they - are not used inside Qt and you do not need to use them. WinRT applications - run in a sandboxed environment for security reasons and support different - architectures, such as ARM and x86. + The Qt port was originally written for WinRT and updated to support UWP. The + port uses the C++ capabilities. While UWP supports the component + extensions internally, they are not used inside Qt and you do not need to + use them. UWP applications run in a sandboxed environment for security + reasons and support different architectures, such as ARM and x86. \target winrt-supported-configurations \section1 Supported Configurations @@ -53,45 +55,27 @@ \section1 Requirements - Development for Windows Runtime requires a Microsoft Windows development host. + Development for UWP requires a Microsoft Windows development host. The minimum version supported is Windows 10. - Depending on your device target you will need the following tools provided - by Microsoft to be installed: - - \table - \header - \li Device Target - \li Environment - \row - \li Windows 10 Mobile - \li Visual Studio 2015 - \row - \li Windows 10 Desktop - \li Visual Studio 2015 - \row - \li Windows 10 IoT - \li Visual Studio 2015 - \row - \li XBox One - \li Visual Studio 2015 - \endtable - - If you are targeting a remote device, please follow all instructions by + Qt supports UWP apps running on any variant of Windows 10 or later on the + desktop PC, IoT, Xbox One, and so on. + + If you are targeting a remote device, follow the instructions by Visual Studio to set it up correctly. \section1 Getting Started \section2 Notes to Desktop Users - As WinRT applications run in a sandboxed environment, some restrictions should be taken + As UWP applications run in a sandboxed environment, some restrictions should be taken into account when considering porting or writing cross-platform applications: \list \li The class QProcess is not implemented (indicated by the macro \c QT_NO_PROCESS being defined) as no subprocesses can be launched. \li Some paths returned by QStandardPaths::writableLocation() may be empty. - \li A WinRT application may not do socket-based communication with another application + \li A UWP application may not do socket-based communication with another application running on the same host (as this would violate the sandboxing). \li Applications run in fullscreen mode only (see QStyleHints). On desktop, the screen size varies as the application is resized. @@ -99,18 +83,18 @@ by maintaining the values locally, so that qputenv() and related functions continue to work. All known variables influencing Qt can be set in source code. - \li WinRT applications are UI applications by nature. This implies that + \li UWP applications are UI applications by nature. This implies that console type applications will have a window created internally, which is always visible. \li Applications should not exit programmatically. In particular, calling exit() before the UI is shown causes a crash. - \li The WinRT clipboard is local to the application; it cannot be retrieved + \li The UWP clipboard is local to the application; it cannot be retrieved by a desktop application. \endlist \section2 Building Applications - You can develop applications for WinRT just as any other Qt applications. + You can develop applications for UWP just as any other Qt applications. Use your favorite editor or IDE (such as Qt Creator) and create your application or load a Qt example. Then run \c qmake and \c {nmake/jom} to build your application. @@ -147,7 +131,7 @@ You will not need to do any conversion to open your project in Qt Creator. Please follow the generic instructions on how to open and build a project. - Qt Creator deploys your application on the WinRT device, if the + Qt Creator deploys your application on the UWP device, if the device is detected by the PC. \note Remote PCs, such as the Surface, are not yet supported for deployment by Creator. @@ -159,30 +143,30 @@ requirements for building Qt. The process of building Qt is found in the \l{Building Qt Sources} page. - Qt for WinRT is always built as a cross-build, because tools, such as qmake, + Qt for UWP is always built as a cross-build, because tools, such as qmake, are built as desktop applications. For compiling those, a desktop development - environment is required. If you have installed Visual Studio 2013 for Windows, - this will only create binaries for WinRT. You will need Visual Studio for + environment is required. If you have installed Visual Studio for Windows, + this will only create binaries for UWP. You will need Visual Studio for Windows Desktop as well to create those desktop tools. Please make sure to use an x86 command prompt (either use the \e {VS x86 Native Tools Command Prompt} or call \e vcvarsall.bat without any parameter or with \c x86) - for every WinRT build. While the toolchain which is used for the + for every UWP build. While the toolchain which is used for the target is set automatically, the command prompt decides what will be used for the host tools like \e qmake or \e moc. Building these tools might fail if another command prompt is used. - The WinRT mkspec format is \c {--} + The UWP mkspec format is \c {--} where architecture can be \c arm, \c x86, or \c x64. The following is an - example of building qtbase for WinRT: + example of building qtbase for UWP: \code - > ./configure -xplatform winrt-x64-msvc2013 -release + > ./configure -xplatform winrt-x64-msvc2017 -release > nmake/jom \endcode \section1 Running Applications from Command Line - WinRT applications must be packaged (including all dependencies) and + UWP applications must be packaged (including all dependencies) and installed or registered with the application service in order to be launched. \l{winrtrunner}{The WinRT Runner Tool} can be used to launch these applications from the command line. @@ -196,7 +180,7 @@ using a \c plugins folder as root. For more information, see \l{Qt for Windows - Deployment}. - As WinRT applications are run in a sandboxed environment, setting + As UWP applications are run in a sandboxed environment, setting the path variable to point to the files required will not work. The \l{The Windows Deployment Tool}{windeployqt} convenience tool looks up diff --git a/doc/src/qt5-intro.qdoc b/doc/src/qt5-intro.qdoc index d47ebce13..f5d9bb342 100644 --- a/doc/src/qt5-intro.qdoc +++ b/doc/src/qt5-intro.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -61,14 +61,14 @@
\endraw - Qt now comes with production-ready ports for Android, iOS, and WinRT. + Qt now comes with production-ready ports for Android and iOS. Extensive work has gone into these platform ports, which now extend Qt’s multi-platform promise to cover desktop, embedded, and mobile platforms. \raw HTML
\endraw - With full support for Android, iOS, and WinRT, Qt is a + With full support for Android and iOS, Qt is a great solution for targeting the mobile markets with a single codebase. It is fast and easy to bring existing desktop or embedded application to mobile, by simply recompiling it. @@ -100,7 +100,6 @@ \list \li \l{Qt for Android} \li \l{Qt for iOS} - \li \l{Qt for WinRT} \endlist \raw HTML
diff --git a/doc/src/qtmodules.qdoc b/doc/src/qtmodules.qdoc index 9c10e872b..169055338 100644 --- a/doc/src/qtmodules.qdoc +++ b/doc/src/qtmodules.qdoc @@ -157,7 +157,7 @@ \li All \li \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, \l{Qt for Linux/X11}{Linux}, \l{Qt for macOS}{\macos}, and - \l{Qt for WinRT}{WinRT} (*) + \l{Qt for UWP}{UWP} (*) \li Provides access to Bluetooth hardware. \row \li \l[QtConcurrent]{Qt Concurrent} @@ -225,7 +225,7 @@ \li \l[QtPositioning]{Qt Positioning} \li All \li \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, \l{Qt for macOS}{\macos}, - \l{Qt for Linux/X11}{Linux}, \l{Qt for WinRT}{WinRT} (*). + \l{Qt for Linux/X11}{Linux}, \l{Qt for UWP}{UWP} (*). \li Provides access to position, satellite and area monitoring classes. \row \li \l[QtPrintSupport]{Qt Print Support} @@ -281,7 +281,7 @@ \row \li \l[QtSensors]{Qt Sensors} \li All - \li \l{Qt for Android}{Android}, \l{Qt for iOS}, \l{Qt for WinRT}{WinRT}, Mer, + \li \l{Qt for Android}{Android}, \l{Qt for iOS}, \l{Qt for UWP}{UWP}, Mer, and \l{Qt for QNX}{QNX}. \li Provides access to sensor hardware and motion gesture recognition. \row diff --git a/doc/src/whatsnew/whatsnew53.qdoc b/doc/src/whatsnew/whatsnew53.qdoc index e275861e0..c8cf7c46f 100644 --- a/doc/src/whatsnew/whatsnew53.qdoc +++ b/doc/src/whatsnew/whatsnew53.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -56,7 +56,6 @@ \list \li Windows Runtime platforms: Windows 8/RT (Modern UI), Windows Phone 8. - The documentation is available at \l{Qt for WinRT}. \endlist diff --git a/doc/src/whatsnew/whatsnew54.qdoc b/doc/src/whatsnew/whatsnew54.qdoc index 0b0085f43..ab0622840 100644 --- a/doc/src/whatsnew/whatsnew54.qdoc +++ b/doc/src/whatsnew/whatsnew54.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -45,7 +45,7 @@ \section1 New Supported Platforms \list - \li \l{Qt for WinRT}{WinRT} now a supported platform + \li Qt for \WinRT now a supported platform \li Windows Phone 8.1 minimum supported version \endlist @@ -76,12 +76,12 @@ color channel. If used as the internal format of a QOpenGLFramebufferObject, the OpenGL paint engine is able to render in full precision if supported by the OpenGL driver. - \li WinRT: Added support for native file dialogs. + \li \WinRT: Added support for native file dialogs. \endlist \section2 Qt Core Module \list - \li WinRT: Added support for native settings container (local and roaming). + \li \WinRT: Added support for native settings container (local and roaming). \li QStorageInfo: Class for providing information about currently mounted storage volumes and drives. \li QByteArrayList: Convenience class adding similar extra methods on top -- cgit v1.2.3