diff options
Diffstat (limited to 'doc')
54 files changed, 1163 insertions, 434 deletions
diff --git a/doc/config/qtdoc.qdocconf b/doc/config/qtdoc.qdocconf index 2296adfc3..be4502a79 100644 --- a/doc/config/qtdoc.qdocconf +++ b/doc/config/qtdoc.qdocconf @@ -65,8 +65,7 @@ qhp.QtDoc.subprojects.examples.sortPages = true images/yIv0vO8B7tQ.jpg \ images/5OiIqFTjUZI.jpg \ images/nmvurCcsWos.jpg \ - images/xNIz78IPBu0.jpg \ - ../images/android-studio-plugin/_AkKSLp5FnM.png + images/xNIz78IPBu0.jpg # Add an .html file with sidebar content, used in the online style HTML.stylesheets += style/qt5-sidebar.html diff --git a/doc/images/android-studio-plugin/Android_Studio_Settings.png b/doc/images/android-studio-plugin/Android_Studio_Settings.png Binary files differdeleted file mode 100644 index bb0f0b3ad..000000000 --- a/doc/images/android-studio-plugin/Android_Studio_Settings.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/CheckPluginInstall.png b/doc/images/android-studio-plugin/CheckPluginInstall.png Binary files differdeleted file mode 100644 index ea4c6abc7..000000000 --- a/doc/images/android-studio-plugin/CheckPluginInstall.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/SettingsSet.png b/doc/images/android-studio-plugin/SettingsSet.png Binary files differdeleted file mode 100644 index 54554b210..000000000 --- a/doc/images/android-studio-plugin/SettingsSet.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/Settings_Qt.png b/doc/images/android-studio-plugin/Settings_Qt.png Binary files differdeleted file mode 100644 index 0ac8278d0..000000000 --- a/doc/images/android-studio-plugin/Settings_Qt.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/_AkKSLp5FnM.png b/doc/images/android-studio-plugin/_AkKSLp5FnM.png Binary files differdeleted file mode 100644 index ed8e84715..000000000 --- a/doc/images/android-studio-plugin/_AkKSLp5FnM.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/android_studio_select_run.png b/doc/images/android-studio-plugin/android_studio_select_run.png Binary files differdeleted file mode 100644 index d0f5a693b..000000000 --- a/doc/images/android-studio-plugin/android_studio_select_run.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/create_new_Qt_project_1.png b/doc/images/android-studio-plugin/create_new_Qt_project_1.png Binary files differdeleted file mode 100644 index 7a2d202b4..000000000 --- a/doc/images/android-studio-plugin/create_new_Qt_project_1.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/create_new_Qt_project_2.png b/doc/images/android-studio-plugin/create_new_Qt_project_2.png Binary files differdeleted file mode 100644 index 419ed613c..000000000 --- a/doc/images/android-studio-plugin/create_new_Qt_project_2.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/import_qt_project.png b/doc/images/android-studio-plugin/import_qt_project.png Binary files differdeleted file mode 100644 index 8478b8275..000000000 --- a/doc/images/android-studio-plugin/import_qt_project.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/open_existing_project.png b/doc/images/android-studio-plugin/open_existing_project.png Binary files differdeleted file mode 100644 index 58997e2cc..000000000 --- a/doc/images/android-studio-plugin/open_existing_project.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/select_android_dir.png b/doc/images/android-studio-plugin/select_android_dir.png Binary files differdeleted file mode 100644 index e1ffdd5a0..000000000 --- a/doc/images/android-studio-plugin/select_android_dir.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/select_example_project.png b/doc/images/android-studio-plugin/select_example_project.png Binary files differdeleted file mode 100644 index 78b745c13..000000000 --- a/doc/images/android-studio-plugin/select_example_project.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/select_gear_install_plugin.png b/doc/images/android-studio-plugin/select_gear_install_plugin.png Binary files differdeleted file mode 100644 index b440d9999..000000000 --- a/doc/images/android-studio-plugin/select_gear_install_plugin.png +++ /dev/null diff --git a/doc/images/android-studio-plugin/selectpluginjar.png b/doc/images/android-studio-plugin/selectpluginjar.png Binary files differdeleted file mode 100644 index e145dd8e1..000000000 --- a/doc/images/android-studio-plugin/selectpluginjar.png +++ /dev/null diff --git a/doc/images/numbers/01.png b/doc/images/numbers/01.png Binary files differindex d73ab969b..1190a99cc 100644 --- a/doc/images/numbers/01.png +++ b/doc/images/numbers/01.png diff --git a/doc/images/numbers/02.png b/doc/images/numbers/02.png Binary files differindex d0b4cfafe..9ae3bae02 100644 --- a/doc/images/numbers/02.png +++ b/doc/images/numbers/02.png diff --git a/doc/images/numbers/03.png b/doc/images/numbers/03.png Binary files differindex 752373f91..9d29cb93f 100644 --- a/doc/images/numbers/03.png +++ b/doc/images/numbers/03.png diff --git a/doc/images/numbers/04.png b/doc/images/numbers/04.png Binary files differindex 08fe1b820..206e92946 100644 --- a/doc/images/numbers/04.png +++ b/doc/images/numbers/04.png diff --git a/doc/images/numbers/05.png b/doc/images/numbers/05.png Binary files differindex 186dd9751..6baa13123 100644 --- a/doc/images/numbers/05.png +++ b/doc/images/numbers/05.png diff --git a/doc/images/numbers/06.png b/doc/images/numbers/06.png Binary files differindex f9454a746..4f398dc26 100644 --- a/doc/images/numbers/06.png +++ b/doc/images/numbers/06.png diff --git a/doc/images/numbers/07.png b/doc/images/numbers/07.png Binary files differindex 0f18d811c..c71842702 100644 --- a/doc/images/numbers/07.png +++ b/doc/images/numbers/07.png diff --git a/doc/images/numbers/08.png b/doc/images/numbers/08.png Binary files differindex 463f77016..f0d894c10 100644 --- a/doc/images/numbers/08.png +++ b/doc/images/numbers/08.png diff --git a/doc/images/numbers/09.png b/doc/images/numbers/09.png Binary files differindex 823c5c0db..0bf3bc7fb 100644 --- a/doc/images/numbers/09.png +++ b/doc/images/numbers/09.png diff --git a/doc/images/numbers/10.png b/doc/images/numbers/10.png Binary files differindex d689be3fa..bec47399a 100644 --- a/doc/images/numbers/10.png +++ b/doc/images/numbers/10.png diff --git a/doc/src/cmake/cmake-manual.qdoc b/doc/src/cmake/cmake-manual.qdoc index 1ee3ebe69..72a62db41 100644 --- a/doc/src/cmake/cmake-manual.qdoc +++ b/doc/src/cmake/cmake-manual.qdoc @@ -105,6 +105,10 @@ documentation on \l{Building projects on the command line}{how to build projects with CMake on the command line}. + To learn the basics of getting started with CMake, take the + \l {https://www.qt.io/academy/course-catalog#-building-with-cmake:-getting-started-with-cmake-and-qt} + {Building with Cmake: Getting Started with CMake and Qt} course in Qt Academy. + \section2 Building a C++ console application A \c{CMake} project is defined by files written in the CMake language. diff --git a/doc/src/configure.qdoc b/doc/src/configure.qdoc index 097d99581..031420245 100644 --- a/doc/src/configure.qdoc +++ b/doc/src/configure.qdoc @@ -150,22 +150,44 @@ \section1 Modules and Features - Qt consists of different \l{All Modules}{modules} whose sources can be - found in different directories inside the top-level source directory. - Users can explicitly exclude specific top-level directories to limit build - times. Furthermore, each Qt module might have features that can also be - explicitly enabled or disabled. + The Qt source code is organized in several top-level directories + called submodules, for example, \c{qtbase}, \c{qtdeclarative} or + \c{qtmultimedia}. Inside these submodules, you find the source code + for the different \l{All Modules}{Qt Modules}. \l{Qt Core}, \l{Qt + Quick}, and \l{Qt Multimedia} are examples of such Qt modules. + + \note Many submodules (top-level source directories) have the same + name as the \l{All Modules}{Qt Modules} they implement, but this is + not always the case. For instance, \c{qtdeclarative} contains \l{Qt + Quick} and \l{Qt Qml}, and various related modules. Consult the + README.md file in the respective directories to get an overview. + + Submodules can be explicitly included or excluded to limit build + times. Furthermore, each Qt module might have features that can also + be explicitly enabled or disabled. + + \section2 Including and Excluding Qt Submodules + + \c configure's \b -skip option is used to exclude submodules + (top-level source directories) from the Qt build. Excluding a + submodule excludes all \l{All Modules}{Qt Modules} inside that + submodule. The \c{qtwayland} submodule contains both the \l{Qt + Wayland Compositor} and the Qt Wayland QPA plugin. Specifying + \c{-skip qtwayland} as a configure option will therefore exclude + both \l{All Modules}{Qt Modules}. - \section2 Excluding Qt Modules + \badcode + ~/qt-source/configure -skip qtwayland + \endcode - \c configure's \b -skip option allows top-level source directories to be - excluded from the Qt build. Note that some directories contain multiple Qt - modules. For example, to exclude the Qt Wayland Compositor and the - Qt Wayland integration plugin from the Qt build, provide - \b{-skip qtwayland} as an option to configure. + \c configure's \b -submodules option can be used to configure a + build that only builds the listed submodules and their dependencies. + For example, by specifying the \c{qtmultimedia} submodule, + \l{Qt Multimedia} and all its dependencies will be included in the + build. Multiple submodules can be separated by commas. \badcode - ~/qt-source/configure -skip qtwayland + ~/qt-source/configure -submodules qtmultimedia,qtactiveqt \endcode \section2 Including or Excluding Features diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 82c485c51..f0562c3e7 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -80,7 +80,7 @@ care must be taken when deploying applications that use these libraries, particularly when the application is statically linked to them. - For more information, see \l{Third-Party Licenses Used in Qt}. + For more information, see \l{Third-Party Code Used in Qt}. Some configurations of QtNetwork use OpenSSL at run-time. Deployment of OpenSSL libraries is subject to both licensing and export restrictions. diff --git a/doc/src/deployment/qt-conf.qdoc b/doc/src/deployment/qt-conf.qdoc index 26391afe2..2fbb0abeb 100644 --- a/doc/src/deployment/qt-conf.qdoc +++ b/doc/src/deployment/qt-conf.qdoc @@ -96,6 +96,15 @@ Prefix = c:\\SomePath \endcode + Since Qt 6.8, it is possible to provide more than one path per entry. + They have to be provided as a comma separated list. For example + \code + QmlImports = "/path/to/imports1","/path/to/imports2" + \endcode + It is possible to add spaces before and after the comma. It is also + possible to omit the quotes around entries if path do not contain + commas or spaces. + \section1 Configuring Arguments to the Platform Plugins The \c qt.conf may contain a \c Platforms group, whose keys are diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 9ae8a924f..35e6e41c1 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -859,6 +859,11 @@ */ /*! + \externalpage https://www.gsmarena.com/samsung_galaxy_tab_a9+-12617.php + \title Samsung Galaxy Tab A9+ +*/ + +/*! \externalpage https://www.gsmarena.com/apple_iphone_12-10509.php \title iPhone 12 */ @@ -922,3 +927,9 @@ \title Plug & Paint Extra Filters Example \keyword tools/plugandpaint/plugins/extrafilters */ + +/*! + \externalpage https://developer.android.com/reference/android/content/Context + \title Android: Context +*/ + diff --git a/doc/src/getting-sources-from-git.qdoc b/doc/src/getting-sources-from-git.qdoc new file mode 100644 index 000000000..841ab966d --- /dev/null +++ b/doc/src/getting-sources-from-git.qdoc @@ -0,0 +1,108 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page getting-sources-from-git.html + + \title Getting Qt Sources from the Git repository + \brief This section describes how to clone and initialize Qt from Git + + \section1 Introduction + + This section describes how to get the Qt sources through the Git + version control system. This is useful in software development + processes that already use Git and when testing different Qt + versions. It is also essential if you plan to contribute to Qt. + + \note Qt sources can also be installed using \QOI, downloaded as + archives from the \l{Qt Account} (commercial users), or from + \l{https://download.qt.io}{download.qt.io} (open-source users). + + Qt is developed and maintained in several Git submodules tied + together in a \c{qt5} super module. Getting the Qt sources from Git + involves cloning the top-level Git repository via the Git command + line and initializing the submodules using the Qt \c{configure} + command. + + \note Qt 5 and Qt 6 share the same repository, and you will work + against the \c{qt5} repository even if you use Qt 6. + + \section1 Preparations + + Start by reviewing \l {Building Qt Sources} and the requirements + section for your platform to make sure all prerequisites have been + installed. In addition, you will need a recent version of Git. + + When planning where to clone the Qt sources, keep in mind that Qt + supports out-of-source builds, where the source code resides + separately from build artifacts. This keeps the Git clone clean and + makes it possible to build different versions of Qt from the same + source tree. In this overview, the directory containing the Qt + sources is referred to as \c{qt-sources}, while the one containing + build artifacts is referred to as \c{qt-build}. + + \section1 Cloning the Qt Git repository + + Begin by creating the \c{qt-sources} directory. From within this + directory, use Git to clone the sources. In the following, we will + use the Git command line interface. Be aware of the trailing '.' + character indicating that Qt is cloned into the current directory. + + \badcode \QtVersion + git clone --branch v\1 git://code.qt.io/qt/qt5.git . + \endcode + + You can also use the https protocol. + + \badcode \QtVersion + git clone --branch v\1 https://code.qt.io/qt/qt5.git . + \endcode + + To test out the latest development version, omit the \c{--branch} + argument. + + \section1 Initializing the Qt submodules + + Next, create the build directory \c{qt-build}. Within this + directory, run the \l{Qt Configure Options}{configure} command with + the \c{-init-submodules} option. + + \badcode + qt-sources/configure -init-submodules + \endcode + + This will recursively initialize all Qt submodules in your + \c{qt-sources} directory, which might take some time. + + Note that \c{-init-submodules} can be combined with other \l{Qt + Configure Options}{configure} arguments. If you know the Qt + submodules you will work with, reduce the configuration time by + using the \c{-submodules} argument. + + \badcode + qt-sources/configure -init-submodules -submodules qtdeclarative + \endcode + + This will initialize \c{qtdeclarative} and required submodules. + + \section1 Building Qt + + With Qt sources set up, proceed to build Qt for your platform as + outlined in \l {Building Qt Sources}. The \c{-init-repository} + argument is only required during the initial Qt configuration and + after switching branches. + + \section1 Contributing to Qt + + For those planning to contribute to Qt, specify the + \c{-codereview-username} the first time you configure Qt. + + \badcode + qt-sources/configure -init-submodules --codereview-username <Gerrit username> + \endcode + + For more information on contributing to Qt and creating a Gerrit + username, consult the + \l{https://contribute.qt-project.org/}{The Qt Project} homepage. + +*/ diff --git a/doc/src/getting-started/create-your-first-applications.qdoc b/doc/src/getting-started/create-your-first-applications.qdoc index a83853523..2eaf85be9 100644 --- a/doc/src/getting-started/create-your-first-applications.qdoc +++ b/doc/src/getting-started/create-your-first-applications.qdoc @@ -66,13 +66,6 @@ \endlist \li \list \li Examples in \l{Qt for Android Automotive} - \li Examples in Qt for Automation - \list - \li \l{Qt CoAP Examples} - \li \l{Qt KNX Examples} - \li \l{Qt MQTT Examples} - \li \l{Qt OPC UA Examples} - \endlist \endlist \row \li MCUs diff --git a/doc/src/getting-started/get-and-install-qt.qdoc b/doc/src/getting-started/get-and-install-qt.qdoc index e77e673f2..e75ee9c02 100644 --- a/doc/src/getting-started/get-and-install-qt.qdoc +++ b/doc/src/getting-started/get-and-install-qt.qdoc @@ -18,6 +18,11 @@ enables installing and uninstalling without any user interaction, that is, unattended usage. + To learn the basics of getting and installing Qt, take the + \l {https://www.qt.io/academy/course-catalog#how-to-install-qt} + {How to Install Qt} course in Qt Academy. + + \section1 Using \QOI You can download \QOI via \l{https://login.qt.io}{Qt Account} diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index bc494f143..1ccb87262 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2019 The Qt Company Ltd. +// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! @@ -34,6 +34,13 @@ visit the following page: \li \l{Qt Configure Options} \endlist +It's also possible for you to build an optimized version of Qt according to your specific needs. +For more information, visit the following page: + +\list +\li \l {Building Optimized Qt} +\endlist + \section1 Windows \list @@ -79,6 +86,7 @@ visit the following page: \li \l [QtQuick3D] {Building From Source} {Building Qt Quick 3D from Source} \li \l {Building Qt Multimedia from sources}{Building Qt Multimedia from Source} + \li \l [QtGRPC] {Module prerequisites}{Qt GRPC and Qt Protobuf Module Requirements} \endlist \section1 Additional Information diff --git a/doc/src/language-overview.qdoc b/doc/src/language-overview.qdoc index 09981784e..5a00f7725 100644 --- a/doc/src/language-overview.qdoc +++ b/doc/src/language-overview.qdoc @@ -44,8 +44,8 @@ with the \l{QML Applications}{QML language}. It defines and implements the language and engine infrastructure, and provides an API to enable and extend the QML language with custom types and integrate QML code - with JavaScript and C++. The Qt QML module provides both a \l{Qt QML QML Types} - {QML API} and a \l{Qt QML C++ Classes}{C++ API}. + with JavaScript and C++. The Qt QML module provides both a \l{Qt Qml QML Types} + {QML API} and a \l{Qt Qml C++ Classes}{C++ API}. The \l {Qt Qml} module provides the language and infrastructure for QML applications. The \l{Qt Quick} module provides many visual components, diff --git a/doc/src/legal/licensechanges.qdoc b/doc/src/legal/licensechanges.qdoc index 3c09cf561..2554ff179 100644 --- a/doc/src/legal/licensechanges.qdoc +++ b/doc/src/legal/licensechanges.qdoc @@ -8,9 +8,44 @@ \brief Information about changes of licenses in Qt and Third Party Modules \ingroup licensing - Changes in Qt and \l{Licenses Used in Qt}{Third Party Modules} + Changes in Qt and \l{Third-Party Code Used in Qt}{Third Party Modules} released with Qt that are relevant to licensing. + \section1 Qt 6.7.2 + + \section2 Qt 3D Module + + \list + \li \l{assimp}{Open Asset Import Library} was updated to version 5.4.1. + \li Usage of \l{miramar-sky}{Miramar Skybox Textures} was removed. + \li Usage of \l{substance_share}{Substance Share} was removed. + \endlist + + \section2 Qt Quick3D module + + \list + \li \l{assimp}{Open Asset Import Library} was updated to version 5.4.1. + \endlist + + \section2 Qt GUI Module + + \list + \li \l{harfbuzz-ng}{HarfBuzz-NG} was updated to version 8.5.0. + \li \l{libjpeg}{LibJPEG-turbo} was updated to version 3.0.3. + \endlist + + \section2 Qt Sensors Module + + \list + \li Usage of \l{android-compass}{Android getRotationMatrix and getOrientation} is now documented. + \endlist + + \section2 Qt SQL Module + + \list + \li \l{sqlite}{SQLite} was updated to version 3.46.0. + \endlist + \section1 Qt 6.7.1 \section2 Qt GUI Module diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc index bf734c8b5..34a6a187f 100644 --- a/doc/src/legal/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -25,7 +25,7 @@ version 3 (or GNU GPL version 3) terms and conditions. \endlist - Qt contains also \l {Licenses Used in Qt}{third-party code} that is licensed + Qt contains also \l {Third-Party Code Used in Qt}{third-party code} that is licensed under specific open-source licenses from the original authors. \note For open-source licensed Qt, some specific parts (modules) are not @@ -55,21 +55,22 @@ For further information and assistance about Qt licensing, contact our sales; see \l{http://www.qt.io/locations/} for contact details. - \section1 Licensed Code in Qt + \section1 Third-Party Code in Qt The following page documents the open-source licenses used in different parts of Qt: \list - \li \l {Licenses Used in Qt} + \li \l {Third-Party Code Used in Qt} \endlist */ /*! \page licenses-used-in-qt.html \keyword Third-Party Licenses Used in Qt - \title Licenses Used in Qt - \brief Information about other licenses and third-party code used in Qt. + \keyword Licenses Used in Qt + \title Third-Party Code Used in Qt + \brief Information about third-party code used in Qt. Qt contains some code that is not provided under the \l{GNU Lesser General Public License (LGPL)} or the diff --git a/doc/src/platforms/android/android-3rdparty-libs.qdoc b/doc/src/platforms/android/android-3rdparty-libs.qdoc index 31cbe3ed0..fd951cf48 100644 --- a/doc/src/platforms/android/android-3rdparty-libs.qdoc +++ b/doc/src/platforms/android/android-3rdparty-libs.qdoc @@ -57,6 +57,8 @@ } \endcode + You can build \l{Android Packaging Options}{AAR Libraries} with Qt for Android. + \section1 Adding a Library Project Having a library called \c{CustomLibrary}, similar to the previous approach, diff --git a/doc/src/platforms/android/android-building-projects-from-commandline.qdoc b/doc/src/platforms/android/android-building-projects-from-commandline.qdoc index 688e3f216..e1be1e48e 100644 --- a/doc/src/platforms/android/android-building-projects-from-commandline.qdoc +++ b/doc/src/platforms/android/android-building-projects-from-commandline.qdoc @@ -148,6 +148,12 @@ \l{Qt Creator: Signing Android Packages}{Signing Android packages}. Otherwise, check the CMake variables \l QT_ANDROID_SIGN_APK and \l QT_ANDROID_SIGN_AAB. + \section2 Building an AAR (Android Archive) File + + \badcode + cmake --build . --target aar + \endcode + \section1 Building with qmake You can continue to use \c qmake to build user projects as in Qt 5. diff --git a/doc/src/platforms/android/android-deploying-application.qdoc b/doc/src/platforms/android/android-deploying-application.qdoc index 2cd02e088..1a7608a03 100644 --- a/doc/src/platforms/android/android-deploying-application.qdoc +++ b/doc/src/platforms/android/android-deploying-application.qdoc @@ -11,14 +11,24 @@ This article describes the technical steps required to deploy a Qt application to an Android device. - \section1 Android Application Bundle + \section1 Android Packaging Options + + You can package code on Android in three ways: either as an Application + Package (APK), an Android App Bundle (AAB), or an Android Archive (AAR). + Each is a specific type of ZIP format that follow a predefined directory + structure. The differences between these formats are: + + \list + \li APK files can be deployed and executed on a device. + \li An AAB is intended to be interpreted by the Google Play store and + is used to generate APK files for different device architectures and + form factors. + \li An AAR fundamentally differs from the APK and AAB formats in that + it is an Android library. You can use it as a dependency for an Android + app module, but you cannot run it by itself. + \endlist - Applications on Android can be packaged in two ways; either as an Application - Package (APK) or Android App Bundle (AAB). Both are a type of ZIP file that - follows a predefined directory structure. The difference between the two is - that APK files can be deployed and executed on a device, whereas AAB is - intended to be interpreted by the Google Play store and is used to generate - APK files for different device architectures and form factors. + \section1 Android Application Bundle For testing the application locally, the APK format is appropriate, as this can be installed and run directly on the device. For distribution @@ -130,11 +140,11 @@ which is a required Gradle dependency for building Android apps. An example of this is: - \badcode + \badcode \AGPVer buildscript { ... dependencies { - classpath 'com.android.tools.build:gradle:x.x.x' + classpath 'com.android.tools.build:gradle:\1' } } \endcode diff --git a/doc/src/platforms/android/android-how-it-works.qdoc b/doc/src/platforms/android/android-how-it-works.qdoc index a29dfab1f..c84710239 100644 --- a/doc/src/platforms/android/android-how-it-works.qdoc +++ b/doc/src/platforms/android/android-how-it-works.qdoc @@ -125,7 +125,7 @@ it to take effect since Qt sets the theme by default. For example, you can use: protected void onCreate(Bundle bundle) { setTheme(android.R.style.Theme_DeviceDefault_DayNight); - super.onCreate(bubdle); + super.onCreate(bundle); } \endcode @@ -144,7 +144,7 @@ after extending \l {The Public Java Bindings}{QtActivity}: protected void onCreate(Bundle bundle) { appendApplicationParameters("--flag value"); - super.onCreate(bubdle); + super.onCreate(bundle); } \endcode @@ -192,6 +192,82 @@ void setActivity(Activity activity) Then, the \c QtLoader invokes these methods with the parent context of the loader just before loading the native shared libraries. +\section1 How Qt for Android Handles the Android Activity Life-cycle + +Qt for Android does not provide an API to directly handle the Android activity +life-cycle callbacks such as onCreate(), onStart(), onResume(), onPause(), +onStop(), and onDestroy(). Instead, it handles these under the hood for the user. +The behavior is outlined in the following sections. + +\note These life-cycle events are translated to the +\l{QGuiApplication::applicationStateChanged} signal. + +\section2 Context Handling + +\l QAndroidApplication can provide the Android \l{Android: Context}{Context} as +a \c QJniObject, essential for interacting with the Android system. This context +can be an Activity or a Service. If there is an Activity, it will be the most +recently started Activity, regardless of whether there are Services. If there is +only Services, it will be the most recently started Service. + +\note Qt for Android does not support multiple Activites. + +\section2 Callbacks + +The QtActivityBase class is designed to keep the implementation details of an +Activity’s various functionalities private within the Qt for Android package. +This class is a mediator between the Android life-cycle and the Qt framework, +translating Android life-cycle callbacks into signals and operations to which +the Qt application can respond. + +\section3 onCreate() + +When the Activity is created, QtActivityBase initializes the Qt +environment. This includes loading the Qt libraries, setting up the class loader +that QJniObject uses, parsing the app’s metadata, and preparing the Qt +application for execution. It ensures that all necessary initialization specific +to the Activity is handled. + +\section3 onStart() + +Calls Android's Activity.OnStart(). + +\section3 onResume() + +When the Activity moves to the foreground, QtActivityBase resumes the Qt +application. It ensures that paused processes or operations continue and the +application is again ready for user interaction. It will re-register the display +manager listener stopped by onPause(). + +\section3 onPause() + +If another activity partially obscures the Activity, QtActivityBase pauses +the Qt application. It will save the application state or release resources that +are not needed while the application is not in the foreground. + +\section3 onStop() + +When the Activity is no longer visible, QtActivityBase stops the Qt +application, which involves more extensive state saving and resource release, +preparing the application for potential destruction. + +\note The QtThread is suspended at this point. + +\section3 onDestroy() + +If the Activity is finished or being destroyed by the +system, QtActivityBase cleans up all resources associated with the +Qt application. It ensures a proper shutdown and that all necessary cleanup +operations are performed. + +This integration allows developers to focus on building their Qt application +without worrying about the intricacies of the Android life-cycle, as +QtActivityBase manages these complexities under the hood. + +\section1 Splash Screen Management + +\l QAndroidApplication can hide the splash screen with a fade effect, which can +be timed with the application’s startup sequence, typically after onCreate(). \section1 More About Qt for Android diff --git a/doc/src/platforms/android/android-studio-tools-plugin.qdoc b/doc/src/platforms/android/android-studio-tools-plugin.qdoc deleted file mode 100644 index 098229a82..000000000 --- a/doc/src/platforms/android/android-studio-tools-plugin.qdoc +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (C) 2024 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - - -/*! - \page qt-tools-for-android-studio.html - \title \QtTAS - \brief Provides an overview and getting started guide for the plugin. - - \section1 Overview - - What you need to know about the plugin: - - \section2 Features - - The plugin allows you to import new or existing Qt QML projects to a new or - existing Android Studio project. - - \section2 Supported configurations - - You can find what is supported here. - - \section3 Host environments - - The \l{Supported Platforms}{host environment limitations} for building - Qt applications also exist for the plugin. The plugin has been tested on - the following operating systems: - \list - \li Linux (Ubuntu 22.04) - \li Windows (10, 11) - \li macOS ARM (Xcode version 15.2) - \endlist - - \section3 Android Studio - - Android Studio Giraffe (2022.3.1) to Iguana (2023.2.1) is supported. - - \section3 Qt for Android - - \l{Qt for Android} version 6.7 or later is required. - - \section3 Android SDK - - \include supported-platforms.qdocinc android - - \section3 Tools - - The \l{Getting started with CMake}{CMake} and Ninja versions that are - supported are packaged with the version of Qt you are installing. - - \section2 Licensing - - This plugin is covered by the \l{Qt Licensing Overview}{Qt Community Edition} - license. - - \section1 Getting started - - The following video covers installing the plugin, installing all the minimum - required Qt dependencies for using the plugin, runs through importing an example - Qt for Android project, and building and running the project on a target device. - - \youtube _AkKSLp5FnM - - The following sections will cover this information, as well as further - details on the plugin's features and UI. - - \section2 Installing dependencies - - \list - \li Qt for Android installation (6.7 or later) - \li Google's Android Studio IDE - \li The \l{Android Development Prerequisites}{Android SDK} - \endlist - - \section3 Install Qt for Android - - There are two ways to get Qt for Android, but for most users, we recommended - the following way: - - \section4 With the \QOI - - To download and install Qt for Android, follow the instructions on the - \l{Get and Install Qt} page, and do a custom install that includes at - least the minimum requirements: - - \list - \li Qt for Android - \li CMake - \li Ninja - \endlist - - The following instructions assume you don't want to install \l{\QDS} and - \l{Qt Creator}. These would normally be installed by default but the instructions - here explicitly deselect these and anything not required. - - \list 1 - \li Select custom install. If you change the location make sure to note - this as you will need it later. - \li Deselect \uicontrol{\QDS}. - \li Expand \uicontrol{Qt 6.7} or later and select \uicontrol{Qt for Android}. - \li Deselect \uicontrol{Developer and Designer Tools}. - \li Select \uicontrol{CMake} and \uicontrol{Ninja}. - \li Select any optional Qt modules you might need. - \li Proceed to install. - \endlist - - \section4 Clone, build and install Qt yourself - - This method should only be used by developers who are working with unreleased - or modified Qt builds. It won't be covered here. - - See \l{Qt for Android - Building from Source}. - - \section3 Install Android Studio and the plugin - - This plugin is installed like any other IntelliJ plugin. - - \list 1 - \li\l{https://developer.android.com/studio}{Download} and install Android - Studio version Giraffe | 2023.1.1 Canary 1 or later. - \li Head to the plugin's Intellij marketplace page to - \l{https://plugins.jetbrains.com/plugin/24060-qt-tools-for-android-studio}{download} - the plugin's jar file. - \li Start Android Studio. - \li On top-right corner select \uicontrol{Settings(gear-icon)->Install Plugins From Disk} - \image android-studio-plugin/select_gear_install_plugin.png - \li Select file and select \uicontrol{OK}. - \image android-studio-plugin/selectpluginjar.png - \li Check that the plugin is installed. - \image android-studio-plugin/CheckPluginInstall.png - \endlist - - \section3 Configure the plugin - - The plugin needs to know where certain parts of the Qt toolchain are. - - \list 1 - \li On top-left corner select \uicontrol{File -> Settings}. - \image android-studio-plugin/Android_Studio_Settings.png - \li Expand \uicontrol{Build,Execution,Deployment} and Select \uicontrol{Qt}. - \image android-studio-plugin/Settings_Qt.png - \li On this page, you need to set the path to the \b{qt-cmake} script, - located in\c{[Qt Folder Path]/<qt version>/android_<architecture>/bin}. - Make sure to select the right architecture for the platform you are - targeting. - \image android-studio-plugin/SettingsSet.png - \list - \li For a windows host select \c{qt-qmake.bat}. - \li For other operating systems select \c{qt-cmake}. - \endlist - \endlist - - \note The \uicontrol {Additional CMake flags} field allows you to modify - your projects CMake call. - - \section3 Install the Android SDK - - Use Android Studio's SDK manager to install the correct API, platform, and - tools for this version of Qt. See \l{Android SDK}. - - \section2 Running the example - - Test your development setup by running the examples shipped with - the Qt installation. You'll need to know your Qt folder path first. - When using the \QOI, the default install locations for the Qt folder are: - \list - \li Windows: C:/Qt - \li macOS: ~/Qt - \li Linux: ~/Qt - \endlist - - The example projects are located under your Qt installation directory - in \c{Qt/Examples/<qt version>/qtdeclarative/examples/platforms/android/}. - To test the examples: - \list 1 - \li From Android Studio's welcome screen, select \uicontrol{Open}. - \image android-studio-plugin/open_existing_project.png - \li Select the Qt project example you want. - \image android-studio-plugin/select_example_project.png - \endlist - - \section2 Compiling and deploying to a target device or emulator - - To compile and deploy, select \uicontrol Run. - - \image android-studio-plugin/android_studio_select_run.png - - This will build the Qt project and the Android Studio project and run it. - - \note Selecting \uicontrol{Make Project} will not build the Qt project. - - \section2 Debugging - - Debugging QML or C++ is not possible with the plugin. For that, - see \l{Qt Creator}. - - \section1 Writing your first application from scratch - - \list 1 - \li From Android Studio top-left select \uicontrol{File -> New -> New Qt Project}. - \image android-studio-plugin/create_new_Qt_project_1.png - \li Set the \uicontrol{name} for the project, select the projects folder, - select the \c{Qt version} and select \uicontrol OK. - \image android-studio-plugin/create_new_Qt_project_2.png - \li Start writing your first Qt QML application! - \endlist - - If you are a returning user or just getting started with QML, the - \l{The QML Reference}{QML Reference} has what you need. - - \section1 Integrating QML in an Android application - - The \l{embedded_qml_target}{API documentation} for embedding QML in Android - applications has specific implementation details and insights into this. - -*/ diff --git a/doc/src/platforms/android/android.qdoc b/doc/src/platforms/android/android.qdoc index 140e2b483..f11d87153 100644 --- a/doc/src/platforms/android/android.qdoc +++ b/doc/src/platforms/android/android.qdoc @@ -18,8 +18,7 @@ If you have an existing Android application try Qt's \l{\QtTAS}{plugin} for Google's Android Studio. Find it on the IntelliJ marketplace to download. The plugin allows you use the \l{Qt Quick View Android Class} to add - Qt Quick content to your Android app as a - \l{https://developer.android.com/reference/android/view/View}{view}. + Qt Quick content to your Android app as a \l {Android: View}{View}. To build Qt from source, see \l{Qt for Android - Building from Source}{Building from Source}. @@ -29,75 +28,7 @@ \include supported-platforms.qdocinc android - \table 50% - \header \li {4,1} Target Devices used in Automated Testing - \header \li Device \li OS Version \li Architecture \li Form Factor - \row \li \l{Pixel 2} - \li Android 11 (API 30) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 2 XL} - \li Android 11 (API 30) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 4} - \li Android 10 (API 29) - \li armv7 - \li Mobile - \row \li \l{Pixel 4A} - \li Android 12 (API 31) - \li armv7, arm64_v8a - \li Mobile - \row \li \l{Pixel 6} - \li Android 13 (API 33) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 6 Pro} - \li Android 12 (API 31) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 6a} - \li Android 14 (API 34) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 7} - \li Android 13 (API 33) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 7 Pro} - \li Android 13 (API 33) - \li arm64_v8a - \li Mobile - \row \li \l{Pixel 7a} - \li Android 14 (API 34) - \li arm64_v8a - \li Mobile - \row \li \l{Samsung Galaxy S10} - \li Android 9 (API 28) - \li armv7, arm64_v8a - \li Mobile - \row \li \l{Samsung Galaxy S21} - \li Android 12 (API 31) - \li armv7, arm64_v8a - \li Mobile - \row \li \l{Samsung Galaxy Tab S4} - \li Android 10 (API 29) - \li armv7, arm64_v8a - \li Tablet - \row \li \l{Nothing Phone 1} - \li Android 14 [UP1A.231005.007] (API 34) - \li arm64_v8a - \li Mobile - \row \li \l{Motorola Moto G5 Plus} - \li Android 8 [UP1A.230519.001] (API 27) - \li arm64_v8a - \li Mobile - \endtable - \note Qt for Android support is inclusive of \b{but not limited to} these devices. - - \note The above table is accurate at the time of this Qt patch release only. - It may change during the patch release cycle and should only be used as a - reference for what the Qt Company can rapidly reproduce bugs on. + \section1 Explore Qt for Android To learn about developing with Qt for Android, here are the main topics to check: @@ -148,6 +79,10 @@ \youtube 5OiIqFTjUZI + To learn the basics of getting started with Qt for Android, take the + \l {https://www.qt.io/academy/course-catalog#getting-started-with-qt-for-android-} + {Getting Started with Qt for Android} course in Qt Academy. + The rest of this page has more detailed getting started information. To download and install Qt for Android, follow the instructions on the @@ -288,8 +223,135 @@ Now you can test your development setup by running the examples shipped with the Qt installation. For more information, see - \l[Qt Examples And Tutorials]{Mobile}{Mobile Examples}. + \l{Qt Examples And Tutorials#Mobile}{Mobile Examples}. To develop a simple application from scratch, see \l {Qt Creator: Creating a Mobile Application}. */ + +/*! + \page android-supported-versions-selection-guidelines.html + \title Qt for Android Supported Versions Selection Guidelines + \brief Provides information about supported Android versions under a Qt release. + + To keep the supported versions to a level that’s maintainable + by Qt, especially for LTS releases which are expected to live for a period of + 3 years, Qt for Android has guidelines for selecting the supported + versions for a given Qt release. This makes the selection clear and + transparent, and help shape proper expectations of support for each Qt for + Android release. + + \section1 Minimum Supported Version + + The guidelines for selecting the minimum supported version are: + + \list + \li Evaluate the minimum version once a year for the fall release of Qt, + which would also cover LTS releases. + \li Target at least 90% of the cumulative usage in the market as listed + on \l {https://apilevels.com}{apilevels.com} at the time of the + platform freeze deadline of a given fall release. + \li The selection is done 1 month before the platform freeze, at which + time we check what versions would fit the 90% range, and decide + whether to select a more recent minimum version or not and to what + new minimum version. + \li The changes are communicated to the Qt development mailing list, + and reflected in the release change log and Qt for Android documentation. + \li In exceptional cases where a change is needed to a version that doesn’t + respect the criteria above, it will be announced at the time of the + platform freeze deadline along with reasons for the decision. + \endlist + + The minimum version changes would be reflected in our CI test runs, and in + the build system (i.e. CMake and androiddeployqt), thus the released libraries + would require said minimum version to run. To target older versions a Qt + rebuild with appropriate build system changes would be needed. Even if such + builds might work for older versions, note that they would fall outside + of Qt official support scope. Although, the official Qt for Android libraries + might or might not work for builds targeting older versions than the minimum + for the release. + + \section1 Maximum Supported Version + + In a spring Qt release, we aim to support an Android version which was + released by Google in the fall of the year before. This becomes the new + maximum supported version by Qt. + + \section1 Target Devices used in Automated Testing + \target target-android-devices-in-rta + + Below is a list of Android devices in automated testing of Qt for Android + releases, it is inclusive of \b {but not limited to} these devices: + + \table 50% + \header \li Device \li OS Version \li Architecture \li Form Factor + \row \li \l{Pixel 2} + \li Android 11 (API 30) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 2 XL} + \li Android 11 (API 30) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 4} + \li Android 10 (API 29) + \li armv7 + \li Mobile + \row \li \l{Pixel 4A} + \li Android 12 (API 31) + \li armv7, arm64_v8a + \li Mobile + \row \li \l{Pixel 6} + \li Android 13 (API 33) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 6 Pro} + \li Android 12 (API 31) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 6a} + \li Android 14 (API 34) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 7} + \li Android 13 (API 33) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 7 Pro} + \li Android 13 (API 33) + \li arm64_v8a + \li Mobile + \row \li \l{Pixel 7a} + \li Android 14 (API 34) + \li arm64_v8a + \li Mobile + \row \li \l{Samsung Galaxy S10} + \li Android 9 (API 28) + \li armv7, arm64_v8a + \li Mobile + \row \li \l{Samsung Galaxy S21} + \li Android 12 (API 31) + \li armv7, arm64_v8a + \li Mobile + \row \li \l{Samsung Galaxy Tab S4} + \li Android 10 (API 29) + \li armv7, arm64_v8a + \li Tablet + \row \li \l{Nothing Phone 1} + \li Android 14 [UP1A.231005.007] (API 34) + \li arm64_v8a + \li Mobile + \row \li \l{Motorola Moto G5 Plus} + \li Android 8 [UP1A.230519.001] (API 27) + \li arm64_v8a + \li Mobile + \row \li \l{Samsung Galaxy Tab A9+} + \li Android 14 [UP1A.231005.007] (API 34) + \li arm64_v8a + \li Mobile + \endtable + + \note The above table is accurate at the time of this Qt patch release only. + It may change during the patch release cycle and should only be used as a + reference for what the Qt Company can rapidly reproduce bugs on. +*/ diff --git a/doc/src/platforms/build-optimized-qt.qdoc b/doc/src/platforms/build-optimized-qt.qdoc new file mode 100644 index 000000000..391e3ba86 --- /dev/null +++ b/doc/src/platforms/build-optimized-qt.qdoc @@ -0,0 +1,179 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page build-optimized-qt.html + \title Building Optimized Qt + \brief Building optimized Qt for your specific needs. + + This page describes the process of configuring and building + a smaller and tailored version of Qt, according to your specific needs. + + \section1 Step 1: Getting the Sources, and Installing Build Requirements and Set Environment + + For getting sources, installing dependencies and setting up environment, + refer to platform-specific instructions: + \list + \li \l{Qt for Windows - Building from Source} + \li \l{Qt for macOS - Building from Source} + \li \l{Qt for Linux/X11 - Building from Source} + \li \l{Configure an Embedded Linux Device} + \li \l{Qt for Android - Building from Source} + \li \l{Qt for iOS - Building from Source} + \endlist + + \section1 Step 2: Building the Qt Libraries and Tools + + Follow your platform-specific instructions and use the following \l {Qt configure options} + to create a build that is optimized for your needs. + + The following table describes in more detail the configure options that help to + reduce build size. + + \table + \header + \li Qt configure option + \li Description + \row + \li -static + \li Produce archive files for static linking. A static binary is linked with + all necessary libraries and dependencies embedded within the executable file itself. + This means that when you run the program, it uses its own internal copy of the + required libraries, rather than relying on external ones. This allows linker to + drop unnecessary parts of the binary code. This is the most optimal solution for single + executable deliveries. + \row + \li -ltcg + \li Link Time Optimization (LTO) is a powerful technique that can significantly + improve the performance and reduce the size of your executable file by analyzing + and optimizing binary code at the linking stage. + \row + \li -reduce-exports + \li Reduce the amount of exported symbols. + \row + \li -gc-binaries + \li Remove unnecessary parts from binary. Place each function or data item + into its own section and enable linker garbage collection of unused sections. + \row + \li -submodules qtbase,qtdeclarative,qtqmlscriptcompiler,qtsvg + \li Submodules to compile. Limit dependencies to unnecessary features. + \row + \li -skip qtlanguageserver,qtquicktimeline + \li Remove automatically included submodules from compilation. Limit dependencies + to unneeded features. + \row + \li -disable-deprecated-up-to <version> + \li Remove deprecated implementation. + + Sets the QT_DISABLE_DEPRECATED_UP_TO value to <version>. QT_DISABLE_DEPRECATED_UP_TO + is used to remove deprecated methods from both API and ABI. <version> is a hex value. + For example, use 0x070000 to remove all code that is deprecated in Qt 7.0.0 + or earlier releases. By default, <version> is set to 0x040000 and 0x050000 on Windows + and non-Windows respectively. + \endtable + + In addition, you can remove features one by one as described in + \l {Including or excluding features}. + This may cause restrictions for available components and functionalities. Not all + combinations are tested. Qt tests a specific \l {https://code.qt.io/cgit/qt/qt5.git/tree/coin/platform_configs/qtlite.yaml} + {configure option combination in Continuous Integration (CI)}. + This configure option combination is capable of running simple QML applications. + + Qt configure command also supports the - - (double dash) command line parameter which allows + user to inject extra CMake arguments such as -DCMAKE_CXX_FLAGS="-march=native". + In case of cross compilation these parameters can be added via + -DCMAKE_TOOLCHAIN_FILE=path/to/toolchain.cmake as described in \l {An Example Toolchain File}. + The following table lists some options that you can consider using with GCC: + + \table + \header + \li Compiler option + \li Description + \row + \li -march <arch> + \li Target architecture. Use "native" if application is executed on the same architecture + where it's compiled. + \row + \li -mtune <tune> + \li Tells the compiler to generate code that takes advantage of the specified processor + architecture's characteristics, such as its instruction set, register count, + and cache hierarchy. + \row + \li -fno-asynchronous-unwind-tables + \li Reduces binary size. Keep in mind that disabling asynchronous unwind tables + can have implications on performance, compatibility, and maintainability of your code. + It's generally recommended to use this option only when necessary, after carefully + considering its potential effects. + \row + \li -fno-unwind-tables + \li Reduces binary size. Keep in mind that disabling unwind tables can have + implications on performance, compatibility, and maintainability of your code. + It's generally recommended to use this option only when necessary, after carefully + considering its potential effects. + + It's worth noting that \c {-fno-unwind-tables} is a more aggressive version of + \c {-fno-asynchronous-unwind-tables}, as it disables the creation of unwind tables + entirely, whereas the latter only disables the asynchronous generation of unwind tables. + \row + \li -fomit-frame-pointer + \li Reduces binary size. When this option is enabled, the compiler doesn't store + a frame pointer on the stack for each function call. Instead, it uses the stack + pointer as the frame pointer, which can save memory and improve performance. It's worth + noting that some compilers, such as GCC and Clang, enable \c {-fomit-frame-pointer} + by default when compiling for certain architectures, such as ARM and PowerPC, or in certain + optimization modes. + \row + \li -fno-exceptions + \li Reduces binary size. When this option is enabled, the compiler doesn't generate + code for try-catch blocks, and any attempts to throw or catch exceptions result + in runtime errors. Qt itself works without exceptions, but some dependencies might + require exceptions. + \row + \li -no-pie + \li Reduces binary size. In general, \c {-fno-pie} should be used with caution + and only when necessary, as it can have implications on the compatibility and + performance of your compiled code. Position independent executable also adds security. + For more information on position-independent code, refer to + \l {https://en.wikipedia.org/wiki/Address_space_layout_randomization} {Address Space Layout Randomization} + in Wikipedia. + \endtable + + The following table lists linker options: + \table + \header + \li Linker option + \li Description + \row + \li -no-pie + \li Reduces binary size. In general, \c {-fno-pie} should be used with caution + and only when necessary, as it can have implications on the compatibility and + performance of your compiled code. Position independent executable also adds security. + For more information on position-independent code, refer to + \l {https://en.wikipedia.org/wiki/Address_space_layout_randomization} {Address Space Layout Randomization} + in Wikipedia. + \endtable + + \section1 Step 3: Building Your Application + + After Qt is installed, you can start building applications with it. + + Optimize QML code generation with CMake project commands. For more information on + QML code generation, see \l {qt_add_qml_module} and \l {Best Practices for QML and Qt Quick}. + + The commands in the following CMake code snippet make the binary size smaller: + + \badcode + set_target_properties( + ExampleApp + PROPERTIES + QT_QMLCACHEGEN_DIRECT_CALLS ON + QT_QMLCACHEGEN_ARGUMENTS "--only-bytecode" + ) + \endcode + + If you plan to build your application from an IDE, you need to register the Qt version explicitly + there. For Qt Creator, see \l{Qt Creator: Adding Qt Versions}. + + If you're using command line to build your application, follow the platform-specific guide. + +*/ diff --git a/doc/src/platforms/linux.qdoc b/doc/src/platforms/linux.qdoc index 7d11b34a6..e9b638eb0 100644 --- a/doc/src/platforms/linux.qdoc +++ b/doc/src/platforms/linux.qdoc @@ -286,7 +286,7 @@ \list \li libfontconfig1-dev - \li libfreetype6-dev + \li libfreetype-dev \li libx11-dev \li libx11-xcb-dev \li libxext-dev @@ -369,9 +369,9 @@ \section1 Step 1: Getting the Sources - Qt sources can be installed in \QOI. Source packages are - also available as \l{https://code.qt.io}{Git repositories}, as archives in - the \l{Qt Account} (commercial users), and on + Qt sources can be installed in \QOI. Source packages are also + available \l{Getting Qt Sources from the Git repository}{through Git}, as + archives in the \l{Qt Account} (commercial users), and on \l{https://download.qt.io/official_releases/qt/}{download.qt.io} (open-source users). @@ -447,7 +447,7 @@ Note that this might require root access. - \section1 Step 4: Using Qt + \section1 Step 4: Building Your Application After Qt is installed, you can start building applications with it. diff --git a/doc/src/platforms/qt6GettingSources.qdocinc b/doc/src/platforms/qt6GettingSources.qdocinc index 73ba4731d..cdc6bacf6 100644 --- a/doc/src/platforms/qt6GettingSources.qdocinc +++ b/doc/src/platforms/qt6GettingSources.qdocinc @@ -8,15 +8,10 @@ You can download the Qt source code from your \l {https://login.qt.io/login} {Qt Account}. - You can also get the Qt sources from the Git repo. Qt Wiki has - instructions for getting Qt sources from Git, see - \l {https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code} {Getting source code}. + You can also get the Qt sources from the Git repo, see + \l{Getting Qt Sources from the Git repository}{Getting source code}. \note Qt sources version must be 6.2 or later. - \note The init-repository script initializes the Qt 6 repository - and clones various Qt 6 sub-modules (see - \l {https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_submodule_source_code} - {Getting the submodule source code}). - Qt modules supported by Qt for INTEGRITY are listed in \l {Supported Qt Modules}. + \note Qt modules supported by Qt for INTEGRITY are listed in \l {Supported Qt Modules}. //! [Getting Qt6 sources] */ diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 8b12c00a9..71627b603 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -186,7 +186,7 @@ \li Ended \li Yes \row - \li 6.5 (6.5.5) LTS + \li 6.5 (6.5.6) LTS \li 2023-03-30 \li 2026-03-30 \li Yes @@ -196,7 +196,7 @@ \li 2024-10-10 \li Yes \row - \li 6.7 (6.7.1) + \li 6.7 (6.7.2) \li 2024-03-26 \li 2025-03-26 \li Yes diff --git a/doc/src/platforms/supported-platforms.qdocinc b/doc/src/platforms/supported-platforms.qdocinc index 641ce16a0..65d5dce49 100644 --- a/doc/src/platforms/supported-platforms.qdocinc +++ b/doc/src/platforms/supported-platforms.qdocinc @@ -1,4 +1,4 @@ -// Copyright (C) 2023 The Qt Company Ltd. +// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! @@ -84,24 +84,37 @@ //! [android] The following configurations are supported in this Qt release: -\table 80% - \header \li Distribution \li Architecture \li Compiler \li JDK \li Gradle \li Package + +\table 60% + \header \li Section \li Description \row + \li \b Distribution \li Android \AndroidMinVer (API \AndroidMinApiVer) \b {to} - \AndroidMaxVer (API \AndroidMaxApiVer) + \AndroidMaxVer (API \AndroidMaxApiVer) + \row + \li \b Architecture \li \AndroidAbis + \row + \li \b Compiler \li \NdkCompilerVer (NDK \NdkVer or \NdkFullVer) + \note It's recommended that Qt apps use the same NDK \NdkVer version + used for building the official Qt for Android libraries to avoid + missing symbol errors. + \row + \li \b JDK \li JDK \JdkVer + \row + \li \b Gradle \li Gradle \GradleVer and AGP \AGPVer - \li Multi-ABI \c{APK}s and \c{AAB}s + \row + \li \b Package + \li Multi-ABI \c {APK}s, \c {AAB}s and \c {AAR}s + \note Multi-ABI builds are available only when using CMake. For more + information, see \l{QT_ANDROID_ABIS}{CMake Android Multi-ABIs}. \endtable -\note Multi-ABI builds are available only when using CMake. For more information, -see \l{QT_ANDROID_ABIS}{CMake Android Multi-ABIs}. - -\note It's recommended that Qt apps use the same NDK \NdkVer version -used for building these official Qt for Android libraries to avoid missing -symbol errors. +For more information on the supported Android versions, see +\l {Qt for Android Supported Versions Selection Guidelines}. //! [android] @@ -194,6 +207,7 @@ combinations. \row \li NVIDIA \li Jetson Orin Nano Developer Kit \li Yocto 5.0 \li \l{Boot to Qt} \row \li NXP \li i.MX 8QuadXPlus MEK \li Yocto 5.0 \li \l{Boot to Qt} \row \li Qualcomm \li Robotics RB5 Development Kit \li Yocto 5.0 \li \l{Boot to Qt} + \row \li StarFive \li VisionFive 2 \li Yocto 5.0 \li \l{Boot to Qt} \row \li TI \li SK-AM69 \li Yocto 5.0 \li \l{Boot to Qt} \row \li Toradex \li Apalis iMX8 \li Yocto 4.0 \li \l{Boot to Qt} \endtable diff --git a/doc/src/platforms/windows.qdoc b/doc/src/platforms/windows.qdoc index 6c3282cda..5c3bda8ed 100644 --- a/doc/src/platforms/windows.qdoc +++ b/doc/src/platforms/windows.qdoc @@ -872,9 +872,9 @@ \section1 Step 1: Getting the Sources - Qt sources can be installed in \QOI. Source packages are - also available as \l{https://code.qt.io}{Git repositories}, as archives in - the \l{Qt Account} (commercial users), and on + Qt sources can be installed in \QOI. Source packages are also + available \l{Getting Qt Sources from the Git repository}{through Git}, as + archives in the \l{Qt Account} (commercial users), and on \l{https://download.qt.io}{download.qt.io} (open-source users). If you install the sources through \QOI, they will @@ -938,6 +938,11 @@ If you wish to build QDoc manually, refer to \l {Installing Clang for QDoc} for specific build requirements. + \section2 Qt GRPC and Qt Protobuf Dependencies + \l {Qt GRPC} and \l {Qt Protobuf} require installing \tt gRPC and \tt Protobuf + packages. You can find the installation instructions for the packages in the + \l {Example of installation for Windows using vcpkg}. + \section2 Setting the Environment For MSVC, do one of the following: @@ -988,7 +993,7 @@ cmake --install . \endcode - \section1 Step 4: Using Qt + \section1 Step 4: Building Your Application After Qt is installed, you can start building applications with it. diff --git a/doc/src/qtmodules.qdoc b/doc/src/qtmodules.qdoc index c35d126c6..6f9845fa0 100644 --- a/doc/src/qtmodules.qdoc +++ b/doc/src/qtmodules.qdoc @@ -99,17 +99,6 @@ \li \l{Qt for Windows}{Windows} \li Classes for applications which use ActiveX and COM \row - \li \l[Qt3D]{Qt 3D} - \li All - \li All - \li Functionality for near-realtime simulation systems with support - for 2D and 3D rendering. - \row - \li \l{Qt 5 Core Compatibility APIs} - \li All - \li All - \li Qt Core APIs that were in Qt 5 but not Qt 6. - \row \li \l{Qt Bluetooth}{Qt Bluetooth} \li All \li \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, \l{Qt for Linux/X11}{Linux}, \l{Boot to Qt}, \l{Qt for macOS}{macOS} @@ -165,11 +154,6 @@ A separate library of \l{Qt OpenGL Widgets C++ Classes} provides a widget for rendering OpenGL graphics. \row - \li \l[QtPDF]{Qt PDF} - \li All - \li \l{Qt for Windows}{Windows}, \l{Qt for Linux/X11}{Linux}, and \l{Qt for macOS}{\macos}. - \li Classes and functions for rendering PDF documents. - \row \li \l[QtPositioning]{Qt Positioning} \li All \li \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, \l{Qt for macOS}{macOS}, @@ -276,12 +260,6 @@ \li Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. \row - \li \l[QtWebEngine]{Qt WebEngine} - \li All - \li \l{Qt for Windows}{Windows}, \l{Qt for Linux/X11}{Linux}, and \l{Qt for macOS}{\macos}. - \li Classes and functions for embedding web content in applications using the - \l{http://www.chromium.org/Home}{Chromium browser project}. - \row \li \l[QtWebSockets]{Qt WebSockets} \li All \li All @@ -362,6 +340,16 @@ \li \l{Qt for Linux/X11}{Linux} \li \l{Qt for Linux/X11}{Linux} and \l{Boot to Qt} targets. \li Provides a framework to develop a Wayland compositor. + \row + \li \l{Qt 5 Compatibility APIs: Graphical Effects} + \li All + \li All + \li Qt Graphical Effects module from Qt 5 provided for compatibility. + \row + \li \l{Qt 5 Core Compatibility APIs} + \li All + \li All + \li Qt Core APIs that were in Qt 5 but not Qt 6. \endtable \note \b{All*} refers to all supported platforms except INTEGRITY. @@ -398,6 +386,35 @@ \li Provides QML and C++ interfaces to create location-aware applications. \endtable + \section1 Qt Extension Modules + Qt Extension Modules bring additional functionality to Qt. They may be part + of a given Qt release, but can deviate from the other Qt modules in terms of + release schedule, platform support, the binaries Qt provides, commercial + support, or compatibility promises. You can find specific details in the + module documentation for each Extension Module. + + The following table lists the Qt Extension Modules: + + \table 80% + + \header + \li Module + \li Development Platforms + \li Target Platforms + \li Description + \row + \li \l[QtWebEngine]{Qt WebEngine} + \li All + \li \l{Qt for Windows}{Windows}, \l{Qt for Linux/X11}{Linux}, and \l{Qt for macOS}{\macos}. + \li Classes and functions for embedding web content in applications using the + \l{http://www.chromium.org/Home}{Chromium browser project}. + \row + \li \l[QtPDF]{Qt PDF} + \li All + \li \l{Qt for Windows}{Windows}, \l{Qt for Linux/X11}{Linux}, and \l{Qt for macOS}{\macos}. + \li Classes and functions for rendering PDF documents. + \endtable + \section1 Where to Go from Here We invite you to explore the rest of Qt. We prepared overviews which help diff --git a/doc/src/whatsnew/whatsnew60.qdoc b/doc/src/whatsnew/whatsnew60.qdoc index f1252ef8f..f65411b1a 100644 --- a/doc/src/whatsnew/whatsnew60.qdoc +++ b/doc/src/whatsnew/whatsnew60.qdoc @@ -28,6 +28,7 @@ \list \li \l{Qt 5 Core Compatibility APIs} + \li \l{Qt 5 Compatibility APIs: Graphical Effects} \li \l[QtShaderTools]{Qt Shader Tools} - for graphics and compute shaders \endlist @@ -62,7 +63,7 @@ \row \li Qt Graphical Effects \li - \li only QML types + \li Available through \l{Qt 5 Compatibility APIs: Graphical Effects} \row \li Qt Location \li \c location diff --git a/doc/src/whatsnew/whatsnew65.qdoc b/doc/src/whatsnew/whatsnew65.qdoc index 2105a7ec2..6e0f161bf 100644 --- a/doc/src/whatsnew/whatsnew65.qdoc +++ b/doc/src/whatsnew/whatsnew65.qdoc @@ -19,7 +19,7 @@ graphical effects on a Qt Quick \l{Item}. \li \l {Qt Quick 3D Physics} - A physics engine for use with Qt Quick 3D. This module is no longer in technical preview. - \li \l {Qt QML Core} - A module that exposes various \l {Qt Core} APIs + \li \l {Qt Qml Core} - A module that exposes various \l {Qt Core} APIs to QML. \endlist diff --git a/doc/src/whatsnew/whatsnew66.qdoc b/doc/src/whatsnew/whatsnew66.qdoc index 5035b7e86..991133a8f 100644 --- a/doc/src/whatsnew/whatsnew66.qdoc +++ b/doc/src/whatsnew/whatsnew66.qdoc @@ -213,7 +213,7 @@ \list \li Added support for managing application permissions via QML. - The \l{Qt QML Core} module exposes the Qt C++ \l [QtCore] {Application Permissions} + The \l{Qt Qml Core} module exposes the Qt C++ \l [QtCore] {Application Permissions} functionality to QML via a set of permission types that can be used to check or request permission in a cross platform manner. See \l{QML Application Permissions} for more information. diff --git a/doc/src/whatsnew/whatsnew68.qdoc b/doc/src/whatsnew/whatsnew68.qdoc index e01b2ef19..bb2455edb 100644 --- a/doc/src/whatsnew/whatsnew68.qdoc +++ b/doc/src/whatsnew/whatsnew68.qdoc @@ -10,91 +10,442 @@ \section1 New and Restored Modules in Qt 6.8 Qt 6.8 adds the following modules and tools: - \section2 New and Restored Modules in Technical Preview + \list + \li The \l{svgtoqml} tool, used to generate QML code from SVG + documents, is now out of tech preview. The tool supports a static + subset of the \c{SVG Tiny 1.2} profile. + \li The Qt Graphs, Qt HTTP Server, Qt Protobuf, and Qt GRPC modules are + all promoted out of tech preview state. + \endlist - \note API and ABI stability is not guaranteed for modules in - technical preview. + \section1 Removed Modules in Qt 6.8 + The following module(s) is deprecated. We strongly advise against using them + in new code. + + \list + \li \l [Qt3D]{Qt 3D} is deprecated. It remains part of the licensed + software and is fully supported. It also remains part of the Qt Project + and continues to be integrated with other modules for future releases. + Critical bugs and security vulnerabilities will be addressed by the + module maintainers at KDAB. + \li Regarding new features and functionality, users should contact + KDAB by emailing info@kdab.com. + \endlist \section1 New Features in Qt 6.8 \section2 Qt Core Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li QChronoTimer is a replacement for QTimer using std::chrono + durations throughout. + \li QTimer::id() returns a Qt::TimerId, introduced and accepted in + place of int timer IDs in new overloads of various methods that + take one. + \li More support for std::chrono durations to replace integral + nanosecond parameters in QAbstractEventDispatcher. + \li QString, QByteArray, and QList gain resizeForOverwrite(). + \li QString, QByteArray gain slice() equivalent to + \c{*this = sliced()}. + \li QString, QByteArray, QList, QVarLengthArray gain max_size() for + compatibility with the Standard Template Library (STL). + \li QList supports construction with uninitialized entries to a + specified size, where the content-type permits. + \li QVarLengthArray::PreallocatedSize tells you the Prealloc parameter. + \li QLatin1StringMatcher::indexOf() can now take a QStringView. + \li QCollatorSortKey now supports move-construction. + \li QStringEncoder and QStringDecoder can now take the encoding name as + a QString. + \li QThread gains isMainThread(), isCurrentThread(). + \li QThreadPool::waitForDone() now accepts a QDeadlineTimer in place of + int milliseconds. + \li QDirListing provides stl-style iteration over directory entries. + \li QVersionNumber can now be constructed from a QSpan; it can also be + iterated over. + \li qHash() now accepts quint128 and qint128. + \li QMap::qHash() tells you a key's hash value. + \li QHash can now hash different types from its key, if they are marked + as having the equivalent hash result for equivalent values + (C++20 only). This works for QString/QStringView and + QByteArray/QByteArrayView pairs. On all systems except on ARM + processors, the QLatin1StringView also participates in the QString + and QStringView hashing. + \li QPointF, QLineF, QRectF, and QMarginsF now support fuzzy comparison + and null-checks. + \li Define \e QT_ENABLE_STRICT_MODE_UP_TO to opt out of various APIs, + documented by which version it cuts them out at. + \li Define \e QT_NO_QASCONST to disable qAsConst(). + \li Define \e {QT_(NO_)USE_NODISCARD_FILE_OPEN} to control + \c {[[nodiscard]]} on \c{open()} methods of I/O classes. + \li QLibraryInfo::paths() returns all relevant paths. + \li QCryptographicHash and QMessageAuthenticationCode gain + \l{QCryptographicHash::}{hashInto()} to compute the hash of data + into a provided buffer. + \li More QtCore types with \c {operator<()} now also support + \c {operator<=>()} when compiled with C++20 + (and \c {compareThreeWay()} even for C++17). These types now + consistently support all six relational operators (as hidden + friends) and the reverse of each mixed-type comparison they + supported. At Qt 6.8, this applies to: + \list + \li \l qfloat16 + \li \l QAnyStringView + \li \l QByteArray + \li \l QByteArrayView + \li \l QCborArray + \li \l QCborMap + \li \l QCborValue + \li \l QChar + \li \l QDate + \li \l QDateTime + \li \l QDeadlineTimer + \li \l QElapsedTimer + \li \l QLatin1Char + \li \l QLatin1StringView + \li \l QModelIndex + \li \l QOperatingSystemVersion + \li \l QPersistentModelIndex + \li \l QString + \li \l QStringView + \li \l QTime + \li \l QTypeRevision + \li \l QUrl + \li \l QUtf8StringView + \li \l QUuid + \li \l QVersionNumber + \endlist \endlist - \section2 Qt GUI Module + \section2 Qt Graphs Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Qt Graphs is promoted out of tech preview. + \li The module is split into two submodules, QtGraphs and + QtGraphsWidgets, to remove the requirement for including widgets + into pure QML applications. \endlist - \section2 Qt Location Module + \section2 Qt GRPC Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Qt GRPC is promoted out of tech preview. + \li Added streaming support to the GrpcQuick module. + \li Removed QGrpcInterceptor, QGrpcInterceptorManager and + QGrpcInterceptorContinuation. + \li Added the \c {writesDone()} method to QGrpcClientStream and + QGrpcBidirStream to half-close a stream from the client side. \endlist - \section2 Qt Network Module + \section2 Qt GUI Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li QStyleHints::colorScheme now has a setter function that allows + applications to try to override the system setting with an explicit + Dark or Light scheme. + \li Added QFont::ContextFontMerging, which can be used to enable a new + font merging algorithm that takes the full string into account when + selecting fallback fonts. This may come at some more cost, but in + certain cases, it will give better results. + \li Added QFont::PreferTypoLineMetrics style strategy, which can be set + to always prefer the typographical line metrics in OpenType fonts, + even if the font does not manually set the \e USE_TYPO_METRICS flag. + \li Added QFontDatabase::addApplicationFallbackFontFamily(), which + provides a means to override the default system fallback fonts for + specific scripts. + \li Added QDesktopServices custom and \e https URL scheme support for + \macos, similar to what iOS has. + \li QImage::Format_CMYK8888 32bit CMYK image format has been added. + \li QColorSpace support for ICC A2B color spaces processing has been + added, along with explicit support for grayscale and CMYK color + spaces. + \li Added support for QColorSpace::Bt2020, QColorSpace::Bt2100Pq, and + QColorSpace::Bt2100Hlg HDR color spaces. + \li QColorSpace::transformModel() returns the underlying processing + model. + \li QColorSpace::colorModel() returns which color model the color space + is made for. + \li QImage::colorTransformed() and QImage::applyColorTransform() + variants with three arguments has been added to support converting + both image format and color space at the same time. + \li QStyleHints::contextMenuTrigger is a writable property that allows + applications to control whether context menus should be opened via + button press or release. + \li Qt Accessibility interfaces now can support reporting of + \l{QAccessible::Attribute}{attributes} as key/value pairs to + clients. + \li QAccessibleAnnouncementEvent can be raised by applications to + request the announcement of a message by assistive technologies. + \li QPageLayout::setMargins now can take an optional + \l {QPageLayout::}{OutOfBoundsPolicy} parameter to indicate whether + margins that are out of bounds should be rejected or clamped. + \li QPdfWriter gained CMYK support for pens/fills. + \li QFontDatabase gained + \l {QFontDatabase::}{addApplicationFallbackFontFamily} to specify + the override default fallback font families for specific scripts. + \li Completed multiview rendering support in QRhi. Multiview is now + also supported with Vulkan 1.1 implementations, instead of + requiring Vulkan 1.2. This is relevant in particular for + Android-based devices such as the Meta Quest 3. + \li Introduced QRhi support for automatically resolving multisample + depth (depth/stencil) rendering into a non-multisample depth + (depth/stencil) texture, on platforms and APIs where this can be + supported. See + \l{QRhiTextureRenderTargetDescription::setDepthResolveTexture()} + and \l {QRhi::ResolveDepthStencil} for details. \endlist - \section2 Qt Positioning Module + \section2 Qt Network Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li QNetworkAccessManager gained support for sending HTTP requests over + a local socket using the \e{unix+http:} or \e{local+http:} scheme. + \li QDnsLookup now supports sending DNS over TLS and can inform whether + the DNS server has performed verification on data authenticity. + \li QDnsLookup gained support for TLS Association records. + \li \l {QNetworkCacheMetaData::headers}{QNetworkCacheMetaData}, + \l {QNetworkProxy::headers}{QNetworkProxy}, + \l {QNetworkRequest::headers}{QNetworkRequest}, and + \l {QNetworkReply::headers}{QNetworkReply} can now get and set + headers. + \li QNetworkRequestFactory allows setting the + \l {QNetworkRequestFactory::}{priority} as well as + \l {QNetworkRequest::Attribute}{attributes} for future requests. + \li Added classes QFormDataPartBuilder and QFormDataBuilder to ease the + creation of QHttpMultipart messages. \endlist - \section2 Qt QML Module + \section2 Qt Network Auth Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Added QOAuthUriSchemeReplyHandler class, which handles + private/custom and https URI scheme redirects (on supported + platforms). + \li Added Proof of Key Code Exchange (PKCE) support to the + QOAuth2AuthorizationCodeFlow class. PKCE is a recommended + security measure to mitigate authorization code interception + attacks. \endlist - \section2 Qt Quick Module + \section2 Qt Positioning Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li The Qt Positioning Android backend can now provide altitude in + \l {Qt Positioning Android plugin}{MSL format} on Android 14 and + later. \endlist - \section2 Qt Quick Controls Module + \section2 Qt Protobuf Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li The Qt Protobuf module is promoted out of tech preview. \endlist - \section2 Qt Quick 3D Module + \section2 Qt Quick Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Added font.contextFontMerging, which can be used to enable a new + font merging algorithm that takes the full text into account when + selecting fallback fonts. This may come at some more cost, but in + certain cases it will give better results. + \li Added font.preferTypoLineMetrics property, which can be set to + always prefer the typographical line metrics in OpenType fonts, + even if the font does not manually set the \e USE_TYPO_METRICS + flag. + \li Added the \l {QtQuick::Image::}{retainWhileLoading} property to + \l {QtQuick::}{Image} and \l {QtQuick::}{BorderImage}. When set to + \c true on images that load asynchronously, the current image data + will be retained until the new image is fully loaded. This can + avoid flickering. + \li Added PlanarTransform, a utility object providing simple functions + for specifying 2D transformation matrices. + \li Added PathRectangle, an optionally rounded rectangle path for + \l Shape and \l PathView. + \li Added the \l {QtQuick::Drag::imageSourceSize}{Drag.imageSourceSize} + property to control the size of the image representing the data + being dragged. + \li Added \l {QQuickRenderTarget::depthTexture} as a way to set a + custom depth texture. + \li Added \l {QQuickRenderTarget::Flag} enumerator to allow specifying + a view format when constructing through the named constructors. + \li \l {QtQuick::}{TableView} now has support for programmatically and + interactively moving \l {QtQuick::TableView::moveColumn}{columns} + and \l {QtQuick::TableView::moveRow}{rows}. + \li All standard Qt Quick items and materials are made compatible with + \l {Multiview Rendering}. This is utilized transparently to the + applications when 2D content is embedded into an Qt Quick 3D XR + scene and multiview rendering is enabled. Multiview rendering can + improve rendering performance and decrease power consumption of + AR/VR devices. + \li Creating multiview-compatible custom materials + (QSGMaterial, QSGMaterialShader) is made possible via + \l {QSGMaterial::viewCount()}. + \li Added support for directing Qt Quick rendering into a 2D texture + array with \l {Multiview Rendering} in QQuickRenderTarget. This is + realized via new overloads of functions such as + \l{QQuickRenderTarget::fromVulkanImage()}, and forms the foundation + of multiview rendering support for XR applications built with + \l {Qt Quick 3D}. + \li Added support for automatically performing + \l{QQuickRenderTarget::Flag}{multisample resolve} at the end of a + render pass in QQuickRenderTarget. Previously multisample rendering + of redirected Qt Quick scenes was only possible by targeting + multisample textures, leaving resolving up to the application or + its shaders. When enabled, Qt Quick will now automatically create + intermediate, multisample textures for use as a color buffer, + performing the resolve into the application-provided + non-multisample texture automatically. This allows making Qt Quick + rendering target textures provided by an external engine, + framework, or API (e.g., OpenXR) that only provides and consumes + non-multisample textures. + \li Added support for + \l{QQuickRenderTarget::setDepthTexture()}{setting a depth texture} + in QQuickRenderTarget. This allows specifying the application's own + texture (or texture array, when using multiview rendering) where + depth data is written, instead of using Qt's own intermediate + buffers. Useful in particular when depth data must be written to a + depth texture provided by an external engine, framework, or API + (e.g., OpenXR). + \li Added support for specifying a texture view format in + QQuickRenderTarget. This is specified via the \c viewFormat + argument in the new overloads for + \l{QQuickRenderTarget::fromVulkanImage()} and similar. This feature + is provided specifically to allow dropping or adding the sRGB + qualifier from or to the texture format, and is useful when having + to work with textures provided by an external engine, framework, or + XR compositor, where control over the texture format is not + available, yet the 3D APIs' implicit linear->sRGB conversion on + shader writes is not acceptable (e.g., because the Qt Quick 3D + material pipeline already performs the same operation). + \li QQuickRenderTarget's internal management of intermediate buffers for + depth/stencil and multisample color data has been redesigned. + Calling \l {QQuickWindow::setRenderTarget()} no longer invalidates + all internal temporary buffers, but rather attempts reuse as long as + the size, format, and other parameters match. This is expected to + lead to performance improvements in applications and libraries that + have to pass in a different native texture to the QQuickWindow on + every frame (e.g, because the texture comes from a buffer pool + maintained by an external engine, framework, or XR compositor). \endlist - \section2 Qt Serial Bus Module + \section2 Qt Quick Shapes Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Added the \e {ShapePath.fillItem} property. This can be used to + take any texture provider item (such as layered items and images) + and use them as fill for the shape. + \li Added the \e {ShapePath.fillTransform} property, which can be used + to set an arbitrary transform on the shape's fill, whether it is an + item or a gradient. \endlist - \section2 Qt Sql Module + \section2 Qt Quick 3D Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Technology Preview of XR support for Qt Quick 3D + \list + \li Support for Head Mounted Displays (HMD) using OpenXR such + as the Meta Quest 2 and 3. + \li Support for Apple Vision Pro. + \li Multi-view rendering (render both eyes in a single pass). + \li Spatial input support via hand tracking or controllers. + \li Support for spatial anchors. + \endlist + \li Improved Shadow Rendering + \list + \li Overall quality improvements. + \li Enhanced shadow debug tooling. + \li Cascading Shadow Maps. + \li Percentage-closer filtering (PCF) soft shadows. + \endlist + \li \l PrincipledMaterial Enhancements + \list + \li Additional parameters for adjusting Fresnel. + \li Support for property masking based on the vertex color + attribute. + \endlist + \li \l CustomMaterial: expose remaining properties from + \l PrincipledMaterial. \endlist - \section2 Qt Test Module + \section2 Qt Quick VectorImage Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Introduced the VectorImage: A component which can be used to render + vector graphics directly Qt Quick with hardware acceleration and no + pre-rasterization. It currently supports the SVG format (a static + subset of the \c{SVG Tiny 1.2} profile.) \endlist - \section2 Qt TextToSpeech Module + \section2 Qt Shader Tools Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Completed support for shaders compatible with multiview rendering. + Added the \c MULTIVIEW keyword to the + \l {Qt Shader Tools Build System Integration}. + \li Added depfile support for shaders processed at build time via + \l{Qt Shader Tools Build System Integration}{qt_add_shaders()}. + Touching a file included via the \c{#include} directive in a shader + will now trigger a recompilation of that shader file when building + the project the next time. \endlist - \section2 Qt WebEngine Module + \section2 Qt Sql Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li QSqlDatabase, QSqlQuery, and QSqlDriver gained + \l {QSqlDatabase::}{numericalPrecisionPolicy}. + \li QSqlDatabase got a new function moveToThread() to change the thread + affinity of the database connection. + \li The PostgreSQL and MySQL/MariaDB drivers now correctly handle + dates/times when the server is in a different timezone than the + client. + \li All logging is now done through categorized loggers, \e {qt.sql}, + to improve debugging. + \li \l {QSqlField::defaultValue}, \l {QSqlField::}{value}, + \l {QSqlField::}{readOnly}, \l {QSqlField::}{requiredStatus}, + \l {QSqlField::}{length}, \l {QSqlField::}{precision}, + \l {QSqlField::}{generated}, \l {QSqlField::}{autoValue}, + and \l {QSqlField::}{tableName} are now properties. + \li \l {QSqlIndex::name} and \l {QSqlIndex::}{cursorName}, + \l {QSqlQuery::forwardOnly}, and + \l {QSqlQuery::}{positionalBindingEnabled} are now properties. \endlist - \section2 Qt WebView Module + \section2 Qt Test Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Added \l{QTEST_THROW_ON_FAIL} and \l{QTEST_THROW_ON_SKIP} C++ + macros and \l{Qt Test Environment Variables}{environment variables} + that, when defined, change how QCOMPARE()/QVERIFY()/QSKIP() etc + exit the test function on failure. Instead of a return, exiting + only the immediately-surrounding function, they throw a special + exception instead, thereby exiting from sub-functions of the test + function, all the way to QtTestLib. + \li The \e {QTRY_*_WITH_TIMEOUT} macros now also accept chrono literals + (was: \c int milliseconds). + \li QTest::failOnWarning() now has a no-parameter overload to support + the common case of fail-on-any-warning, without needing to + construct a match-everything regular expression. + \li \l QSignalSpy no longer inherits from \l QObject. If your code uses + the fact that QSignalSpy is-a QObject, you need to redesign around + this now. + \li The QSignalSpy::signal() method no longer necessarily returns an + empty byte array when the connection failed. Use the existing + \l{QSignalSpy::}{isValid()} method to determine whether a given + QSignalSpy object listens to a valid signal on a valid object. + \li The QCOMPARE_xx macros can now only find QTest::toString() + expansions that are either found via Argument Dependent Lookup on + the type in question or are an instantiation of the + QTest::toString<T>() template. This matches the behavior of the + \l QCOMPARE() macro. \endlist - \section2 Qt Widgets Module + \section2 Qt WebEngine Module \list - \li Nothing to see here. //! TODO Clean this up before release. + \li QWebEngineFrame added for frame specific API, such as running + javascript on specific frames, or printing specific frames. + \li QWebEngineClientHints added to better control the browser + identification to web pages using client hints DOM api. + \li QWebEnginePermission added to manage new and existing website + permissions. The existing permissions API in QWebEnginePage has + been deprecated, and replaced by QWebEngineProfile::getPermission() + and QWebEngineProfile::listPermissions() + \li Added QWebEngineProfile::setPersistentPermissionsPolicy() to + control how website permissions persist across browsing sessions. + By default, incoming permissions are saved to disk. + \li Added QWebEnginePermission::ClipboardReadWrite and + QWebEnginePermission::LocalFontsAccess permission types. + \li QWebEngineCertificateError::isMainFrame() indicates the certificate + error is from a main or sub frame. + \li QWebEngineNavigationRequest::hasFormData() added to indicate a + navigation request sending form data. + \li QWebEngineSettings::imageAnimationPolicy() added to control image + animation policy. \endlist \section1 Platform Changes @@ -103,36 +454,68 @@ \section3 Windows \list - \li Nothing to see here. //! TODO Clean this up before release. - \endlist - - \section3 \macos - \list - \li Nothing to see here. //! TODO Clean this up before release. - \endlist - - \section3 X11 - \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Changed the font system to use DirectWrite as the default backend. + This enables some modern features which were not available with the + legacy GDI backend. The previous backend is still available and can + be enabled by passing \c{fontengine=gdi} as parameter to the QPA + plugin. \endlist \section3 Wayland Client on Linux \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Added a new window decoration style that is used on GNOME and uses + similar styling as GNOME. + \li Modal status of dialogs is now forwarded to the compositor via the + new \e {xdg-dialog-v1 protocol}. + \li Showing a window will now also request activation from the + compositor (except when Qt::WA_ShowWithoutActivating is set). + \li Added support to qtwaylandscanner to send null for null QString. + \li Added options \c PUBLIC_CODE and \c PRIVATE_CODE to + \l qt6_generate_wayland_protocol_client_sources that control the + options that are passed to \c wayland-scanner. \endlist \section2 Mobile Platforms \section3 Android \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Bumped the minimum supported version to Android 9. + \li Added support for build.gradle namespace property. + \li Added a CMake property \l QT_ANDROID_PACKAGE_NAME to set the + package name. + \li Updated Gradle to 8.7 and AGP to 8.4.0. + \li Added support for + \l {Building an AAR (Android Archive) File} + {building AAR library packages}. + \li Deprecated the native Android backend in Qt Multimedia. + \li When opening libraries with QLibrary, JNI_OnLoad is no longer + called by default. + \li \l QtQuickView and QML Embedding: + \list + \li Added strong typing support for QtQuickView API. + \li Added API to manage QML Components, under this Java classes + under QtQuickView were moved to own classes. This includes: + \list + \li QtQuickView.SignalListener to QtSignalListener. + \li QtQuickView.StatusChangeListener to + QtQmlStatusChangeListener. + \li QtQuickView Status to QtQmlStatus. + \endlist + \li Added Java classes QtAbstractItemModel, + QtAbstractListModel, and QtModelIndex, that wraps + QAbstractItemModel, QAbstractListModel, and QModelIndex, + respectively. + \li Added support for QML embedding from a Service. + \endlist \endlist - \section3 iOS + \section3 visionOS \list - \li Nothing to see here. //! TODO Clean this up before release. + \li Qt, and Qt applications can now be built for visionOS. \endlist + \section2 Embedded Platforms + \section1 List of API Changes These pages contain an overview of API changes in Qt 6.8: |