aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md669
1 files changed, 272 insertions, 397 deletions
diff --git a/README.md b/README.md
index db773ed5ff..7feacabd33 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,27 @@
# Qt Creator
-Qt Creator is a cross-platform IDE for development with the Qt framework.
+Qt Creator is a cross-platform, integrated development environment (IDE) for
+application developers to create applications for multiple desktop, embedded,
+and mobile device platforms.
+
+The Qt Creator Manual is available at:
+
+https://doc.qt.io/qtcreator/index.html
+
+For an overview of the Qt Creator IDE, see:
+
+https://doc.qt.io/qtcreator/creator-overview.html
## Supported Platforms
The standalone binary packages support the following platforms:
-* Windows 7 or later
-* (K)Ubuntu Linux 16.04 (64-bit) or later
-* macOS 10.12 or later
+* Windows 10 (64-bit) or later
+* (K)Ubuntu Linux 22.04 (64-bit) or later
+* macOS 11 or later
+
+When you compile Qt Creator yourself, the Qt version that you build with
+determines the supported platforms.
## Contributing
@@ -19,471 +32,333 @@ https://wiki.qt.io/Setting_up_Gerrit
See the following page for information about our coding standard:
-https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
+https://doc.qt.io/qtcreator-extending/coding-style.html
## Compiling Qt Creator
Prerequisites:
-* Qt 5.11.0 or later
+* Qt 6.4.3 or later. The Qt version that you use to build Qt Creator defines the
+ minimum platform versions that the result supports
+ (Windows 10, RHEL/CentOS 8.4, Ubuntu 20.04, macOS 10.15 for Qt 6.4.3).
* Qt WebEngine module for QtWebEngine based help viewer
* On Windows:
- * ActiveState Active Perl
- * MinGW with g++ 5.3 or Visual Studio 2017 or later
- * jom
- * Python 3.5 or later (optional, needed for the python enabled debug helper)
+ * MinGW with GCC 11.2 or Visual Studio 2019 or later
+ * Python 3.8 or later (optional, needed for the python enabled debug helper)
+ * Debugging Tools for Windows (optional, for MSVC debugging support with CDB)
* On Mac OS X: latest Xcode
-* On Linux: g++ 5.3 or later
-* LLVM/Clang 8.0.0 or later (optional, needed for the Clang Code Model, Clang Tools, ClangFormat,
- Clang PCH Manager and Clang Refactoring plugins, see the section
- "Get LLVM/Clang for the Clang Code Model". The LLVM C++ API provides no compatibility garantee,
- so if later versions don't compile we don't support that version.)
-* CMake (only for manual builds of LLVM/Clang)
-* Qbs 1.7.x (optional, sources also contain Qbs itself)
-
-The installed toolchains have to match the one Qt was compiled with.
-
-You can build Qt Creator with
-
- # Optional, needed for the Clang Code Model if llvm-config is not in PATH:
- export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows)
- # Optional, disable Clang Refactoring
- export QTC_DISABLE_CLANG_REFACTORING=1
- # Optional, needed to let the QbsProjectManager plugin use system Qbs:
- export QBS_INSTALL_DIR=/path/to/qbs
- # Optional, needed for the Python enabled dumper on Windows
- set PYTHON_INSTALL_DIR=C:\path\to\python
- # Optional, needed to use system KSyntaxHighlighting:
- set KSYNTAXHIGHLIGHTING_LIB_DIR to folder holding the KSyntaxHighlighting library
- # if automatic deducing of include folder fails set KSYNTAXHIGHLIGHTING_INCLUDE_DIR as well
- # both variables can also be passed as qmake variables
-
- cd $SOURCE_DIRECTORY
- qmake -r
- make (or mingw32-make or nmake or jom, depending on your platform)
-
-Installation ("make install") is not needed. It is however possible, using
-
- make install INSTALL_ROOT=$INSTALL_DIRECTORY
-
-## Compiling Qt and Qt Creator on Windows
-
-This section provides step by step instructions for compiling the latest
-versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to
-compile Qt yourself, you can use one of the versions of Qt shipped with the Qt
-SDK (release builds of Qt using MinGW and Visual C++ 2017 or later).
-For detailed information on the supported compilers, see
-<https://wiki.qt.io/Building_Qt_5_from_Git> .
-
- 1. Decide which compiler to use: MinGW or Microsoft Visual Studio. If you
- plan to contribute to Qt Creator, you should compile your changes with
- both compilers.
-
- 2. Install Git for Windows from <https://git-for-windows.github.io/>. If you plan to
- use the MinGW compiler suite, do not choose to put git in the
- default path of Windows command prompts. For more information, see
- step 9.
-
- 3. Create a working directory under which to check out Qt and Qt Creator,
- for example, `c:\work`. If you plan to use MinGW and Microsoft Visual
- Studio simultaneously or mix different Qt versions, we recommend
- creating a directory structure which reflects that. For example:
- `C:\work\qt5.11.0-vs15, C:\work\qt5.11.0-mingw`.
-
- 4. Download and install Perl from <https://www.activestate.com/activeperl>
- and check that perl.exe is added to the path. Run `perl -v` to verify
- that the version displayed is 5.10 or later. Note that git ships
- an outdated version 5.8 which cannot be used for Qt.
-
- 5. In the working directory, check out the respective branch of Qt from
- <https://code.qt.io/cgit/qt/qt5.git> (we recommend the highest released version).
-
- 6. Check out Qt Creator (master branch or latest version, see
- <https://code.qt.io/cgit/qt-creator/qt-creator.git>).
- You should now have the directories qt and creator under your working
- directory.
-
- 7. Install a compiler:
- - For a MinGW toolchain for Qt, see <https://wiki.qt.io/MinGW> .
-
- - For Microsoft Visual C++, install the Windows SDK and the "Debugging
- Tools for Windows" from the SDK image. We strongly recommend using the
- 64-bit version and 64-bit compilers on 64-bit systems.
-
- For the Visual C++ compilers, it is recommended to use the tool 'jom'.
- It is a replacement for nmake that utilizes all CPU cores and thus
- speeds up compilation significantly. Download it from
- <https://download.qt.io/official_releases/jom>
- and add the executable to the path.
-
- 8. For convenience, we recommend creating shell prompts with the correct
- environment. This can be done by creating a .bat-file
- (such as, `<working_directory>\qtvars.bat`) that contains the environment
- variable settings.
- A `.bat`-file for MinGW looks like:
-
- set PATH=<path_to_qt>\[qtbase\]bin;<path_to_mingw>\bin;<working_directory>\creator\bin;%PATH%
- set QMAKESPEC=win32-g++
-
- For the Visual C++ compilers, call the `.bat` file that sets up the
- environment for the compiler (provided by the Windows SDK or the
- compiler):
-
- CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- set PATH=<path_to_qt>\[qtbase\]bin;<working_directory>\creator\bin;%PATH%
- set QMAKESPEC=win32-msvc2013
-
- You can create desktop links to the `.bat` files using the working
- directory and specifying
-
- %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k <working_directory>\qtvars.bat
-
- 9. When using MinGW, open the shell prompt and enter:
-
- sh.exe
-
- That should result in a `sh is not recognized as internal or external
- command...` error. If a `sh.exe` is found, the compile process will fail.
- You have to remove it from the path.
-
- 10. To make use of the Clang Code Model:
-
- * Install LLVM/Clang - see the section "Get LLVM/Clang for the Clang
- Code Model".
- * Set the environment variable LLVM_INSTALL_DIR to the LLVM/Clang
- installation directory if llvm-config is not in PATH.
- * Before you launch Qt Creator you may prepend the PATH with
- the location of libclang.dll/.so that you want to be used.
- See more info in the section "Prebuilt LLVM/Clang packages".
- * When you launch Qt Creator, activate the Clang Code Model plugin as
- described in doc/src/editors/creator-only/creator-clang-codemodel.qdoc.
-
- 11. You are now ready to configure and build Qt and Qt Creator.
- Please see <https://wiki.qt.io/Building_Qt_5_from_Git> for
- recommended configure-options for Qt 5.
- To use MinGW, open the the shell prompt and enter:
-
- cd <path_to_qt>
- configure <configure_options> && mingw32-make -s
- cd ..\creator
- qmake && mingw32-make -s
-
- To use the Visual C++ compilers, enter:
-
- cd <path_to_qt>
- configure <configure_options> && jom
- cd ..\creator
- qmake && jom
-
- 12. To launch Qt Creator, enter:
- qtcreator
-
- 13. To test the Clang-based code model, verify that backend process
- bin\clangbackend.exe
- launches (displaying its usage).
-
- The library libclang.dll needs to be copied to the bin directory if
- Clang cannot be found in the path.
-
- 14. When using Visual C++ with the "Debugging Tools for Windows" installed,
- the extension library `qtcreatorcdbext.dll` to be loaded into the
- Windows console debugger (`cdb.exe`) should have been built under
- `lib\qtcreatorcdbext32` or `lib\qtcreatorcdbext64`.
- When using a 32 bit-build of Qt Creator with the 64 bit version of the
- "Debugging Tools for Windows" the library should also be built with
- a 64 bit compiler (rebuild `src\libs\qtcreatorcdbext` using a 64 bit
- compiler).
-
- If you are building 32 bit and running on a 64 bit
- Windows, you can obtain the 64 bit versions of the extension library
- and the binary `win64interrupt.exe`, which is required for
- debugging from the repository
- <https://code.qt.io/cgit/qt-creator/binary-artifacts.git/tree> .
-
- 15. Qt Creator can be registered as a post-mortem debugger. This
- can be done in the options page or by running the tool qtcdebugger
- with administrative privileges passing the command line options
- -register/unregister, respectively. Alternatively,
- the required registry entries
-
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug
-
- can be modified using the registry editor regedt32 to contain
-
- <path>\qt-creator\bin\qtcdebugger %ld %ld
-
- When using a self-built version of Qt Creator as post-mortem debugger, it needs to be
- able to find all dependent Qt-libraries and plugins when being launched by the
- system. The easiest way to provide them for Qt 5 is to run the tool windeployqt:
-
- windeployqt -quick -qmldir share\qtcreator\welcomescreen -qmldir src\plugins\qmlprofiler bin\qtcreator.exe lib\qtcreator lib\qtcreator\plugins
-
-Note that unlike on Unix, you cannot overwrite executables that are running.
-Thus, if you want to work on Qt Creator using Qt Creator, you need a
-separate build of it. We recommend using a separate, release-built version
-of Qt and Qt Creator to work on a debug-built version of Qt and Qt Creator
-or using shadow builds.
-
-## Get LLVM/Clang for the Clang Code Model
-
-The Clang Code Model depends on the LLVM/Clang libraries. The currently
-supported LLVM/Clang version is 8.0.
-
-### Prebuilt LLVM/Clang packages
-
-Prebuilt packages of LLVM/Clang can be downloaded from
-
- https://download.qt.io/development_releases/prebuilt/libclang/
-
-This should be your preferred option because you will use the version that is
-shipped together with Qt Creator. In addition, MinGW packages for Windows are
-faster due to profile-guided optimization. If the prebuilt packages do not
-match your configuration, you need to build LLVM/Clang manually.
-
-If you use the MSVC compiler to build Qt Creator the suggested way is:
- 1. Download both MSVC and MinGW packages of libclang.
- 2. Use the MSVC version of libclang during the Qt Creator build.
- 3. Prepend PATH variable used for the run time with the location of MinGW version of libclang.dll.
- 4. Launch Qt Creator.
+* On Linux: GCC 9 or later
+* LLVM/Clang 14 or later (optional, LLVM/Clang 17 is recommended.
+ See [instructions](#getting-llvmclang-for-the-clang-code-model) on how to
+ get LLVM.
+ The ClangFormat plugin uses the LLVM C++ API.
+ Since the LLVM C++ API provides no compatibility guarantee,
+ if later versions don't compile we don't support that version.)
+* CMake
+* Ninja (recommended)
-If you use GCC 5 or higher on Linux, please do not use our LLVM package, but get
-the package for your distribution. Our LLVM package is compiled with GCC 4, so
-you get linking errors, because GCC 5 is using a C++ 11 conforming string
-implementation, which is not used by GCC 4. To sum it up, do not mix GCC 5 and
-GCC 4 binaries. On Ubuntu, you can download the package from
-http://apt.llvm.org/ with:
+The used toolchain has to be compatible with the one Qt was compiled with.
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-8.0 main"
- sudo apt-get update
- sudo apt-get install llvm-8.0 libclang-8.0-dev
+### Getting Qt Creator from Git
-There is a workaround to set _GLIBCXX_USE_CXX11_ABI to 1 or 0, but we recommend
-to download the package from http://apt.llvm.org/.
+The official mirror of the Qt Creator repository is located at
+https://code.qt.io/cgit/qt-creator/qt-creator.git/. Run
- https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
+ git clone https://code.qt.io/qt-creator/qt-creator.git
-### Building LLVM/Clang manually
-
-You need to install CMake in order to build LLVM/Clang.
-
-Build LLVM/Clang by roughly following the instructions at
-http://llvm.org/docs/GettingStarted.html#git-mirror:
-
- 1. Clone LLVM and checkout a suitable branch
-
- git clone -b release_80-based --recursive https://code.qt.io/clang/llvm
-
- 2. Build and install LLVM/Clang
+to clone the Qt Creator sources from there. This creates a checkout of the
+Qt Creator sources in the `qt-creator/` directory of your current working
+directory.
- mkdir build
- cd build
+Qt Creator relies on some submodules, like
+[litehtml](https://github.com/litehtml) for displaying documentation. Get these
+submodules with
- For Linux/macOS:
+ cd qt-creator # switch to the sources, if you just ran git clone
+ git submodule update --init --recursive
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<installation location> -DLLVM_ENABLE_RTTI=ON ../llvm
- make install
+Note the `--recursive` in this command, which fetches also submodules within
+submodules, and is necessary to get all the sources.
- For Windows:
+The git history contains some coding style cleanup commits, which you might
+want to exclude for example when running `git blame`. Do this by running
- cmake -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<installation location> -DLLVM_ENABLE_RTTI=ON ..\llvm
- jom install
+ git config blame.ignoreRevsFile .gitignore-blame
-## Third-party Components
+### Linux and macOS
-Qt Creator includes the following third-party components,
-we thank the authors who made this possible:
+These instructions assume that Ninja is installed and in the `PATH`, Qt Creator
+sources are located at `/path/to/qtcreator_sources`, Qt is installed in
+`/path/to/Qt`, and LLVM is installed in `/path/to/llvm`.
-### KSyntaxHighlighting
+Note that if you install Qt via the online installer, the path to Qt must
+include the version number and compiler ABI. The path to the online installer
+content is not enough.
- Syntax highlighting engine for Kate syntax definitions
+Note that `/path/to/Qt` doesn't imply the full path depth like:
+`$USER/Qt/6.2.4/gcc_64/lib/cmake/Qt6`, but only `$USER/Qt/6.2.4/gcc_64`.
- This is a stand-alone implementation of the Kate syntax highlighting
- engine. It's meant as a building block for text editors as well as
- for simple highlighted text rendering (e.g. as HTML), supporting both
- integration with a custom editor as well as a ready-to-use
- QSyntaxHighlighter sub-class.
+See [instructions](#getting-llvmclang-for-the-clang-code-model) on how to
+get LLVM.
- Distributed under the:
+ mkdir qtcreator_build
+ cd qtcreator_build
- MIT License
+ cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources
+ cmake --build .
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
+#### Troubleshooting: libxcb plugin not found while using Qt libraries built locally from source
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
+Ensure all prerequisites for building Qt are installed:
+https://doc.qt.io/qt-6/linux.html
+https://doc.qt.io/qt-6/linux-requirements.html
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+If they were installed before building Qt and xcb plugin is missing try reinstall them with
- The source code of KSyntaxHighlighting can be found here:
- https://cgit.kde.org/syntax-highlighting.git
- QtCreator/src/libs/3rdparty/syntax-highlighting
- https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/syntax-highlighting
+```sh
+ sudo apt-get --reinstall <package_name>
+```
-### Clazy
+Reset building configuration for Qt libraries at '/path/to/qt_sources'
- https://github.com/KDE/clazy
+```sh
+ cmake --build . --target=clean
+```
- Copyright (C) 2015-2018 Clazy Team
+and remove CMakeCache.txt
- Distributed under GNU LIBRARY GENERAL PUBLIC LICENSE Version 2 (LGPL2).
+```sh
+ rm CMakeCache.txt
+```
- Integrated with patches from
- http://code.qt.io/cgit/clang/clang-tools-extra.git/.
+Try building Qt source again.
-### LLVM/Clang
- http://llvm.org/svn/llvm-project/llvm
- http://llvm.org/svn/llvm-project/cfe/trunk
- http://llvm.org/svn/llvm-project/clang-tools-extra/trunk
+### Windows
- Copyright (C) 2003-2018 LLVM Team
+These instructions assume that Ninja is installed and in the `PATH`, Qt Creator
+sources are located at `\path\to\qtcreator_sources`, Qt is installed in
+`\path\to\Qt`, and LLVM is installed in `\path\to\llvm`.
- Distributed under the University of Illinois/NCSA Open Source License (NCSA),
- see https://github.com/llvm-mirror/llvm/blob/master/LICENSE.TXT
+Note that if you install Qt via the online installer, the path to Qt must
+include the version number and compiler ABI. The path to the online installer
+content is not enough.
- With backported/additional patches from
- http://code.qt.io/cgit/clang/llvm.git/
- http://code.qt.io/cgit/clang/clang.git/
+Note that `\path\to\Qt` doesn't imply the full path depth like:
+`c:\Qt\6.2.4\msvc2019_64\lib\cmake\Qt6`, but only `c:/Qt/6.2.4/msvc2019_64`.
+The usage of slashes `/` is intentional, since CMake has issues with backslashes `\`
+in `CMAKE_PREFX_PATH`, they are interpreted as escape codes.
-### Reference implementation for std::experimental::optional
+See [instructions](#getting-llvmclang-for-the-clang-code-model) on how to
+get LLVM.
- https://github.com/akrzemi1/Optional
+Decide which compiler to use: MinGW or Microsoft Visual Studio.
- QtCreator/src/libs/3rdparty/optional
+MinGW is available via the Qt online installer, for other options see
+<https://wiki.qt.io/MinGW>. Run the commands below in a shell prompt that has
+`<path_to_mingw>\bin` in the `PATH`.
- Copyright (C) 2011-2012 Andrzej Krzemienski
+For Microsoft Visual C++ you can use the "Build Tools for Visual Studio". Also
+install the "Debugging Tools for Windows" from the Windows SDK installer. We
+strongly recommend using the 64-bit version and 64-bit compilers on 64-bit
+systems. Open the `x64 Native Tools Command Prompt for VS <version>` from the
+start menu items that were created for Visual Studio, and run the commands
+below in it.
- Distributed under the Boost Software License, Version 1.0
- (see accompanying file LICENSE_1_0.txt or a copy at
- http://www.boost.org/LICENSE_1_0.txt)
+ md qtcreator_build
+ cd qtcreator_build
- The idea and interface is based on Boost.Optional library
- authored by Fernando Luis Cacciola Carballal
+ cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" \path\to\qtcreator_sources
+ cmake --build .
-### Implementation for std::variant
+Qt Creator can be registered as a post-mortem debugger. This can be done in the
+options page or by running the tool qtcdebugger with administrative privileges
+passing the command line options -register/unregister, respectively.
+Alternatively, the required registry entries
- https://github.com/mpark/variant
+ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
+ HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug
- QtCreator/src/libs/3rdparty/variant
+can be modified using the registry editor regedt32 to contain
- Copyright Michael Park, 2015-2017
+ qtcreator_build\bin\qtcdebugger %ld %ld
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+When using a self-built version of Qt Creator as post-mortem debugger, it needs
+to be able to find all dependent Qt-libraries and plugins when being launched
+by the system. The easiest way to do this is to create a self-contained Qt
+Creator by installing it and installing its dependencies. See "Options" below
+for details.
-### Open Source front-end for C++ (license MIT), enhanced for use in Qt Creator
-
- Roberto Raggi <roberto.raggi@gmail.com>
-
- QtCreator/src/shared/cplusplus
-
- Copyright 2005 Roberto Raggi <roberto@kdevelop.org>
+Note that unlike on Unix, you cannot overwrite executables that are running.
+Thus, if you want to work on Qt Creator using Qt Creator, you need a separate
+installation of it. We recommend using a separate, release-built version of Qt
+Creator to work on a debug-built version of Qt Creator.
+
+Alternatively, take the following template of `CMakeUserPresets.json` for
+reference. Write your own configurePreset inheriting `cmake-plugin-minimal` in
+`CMakeUserPresets.json` to build with IDEs (such as QtCreator, VSCode,
+CLion...etc) locally:
+
+```json
+{
+ "version": 4,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 23,
+ "patch": 0
+ },
+ "configurePresets": [
+ {
+ "name": "custom",
+ "displayName": "custom",
+ "description": "custom",
+ "inherits": "cmake-plugin-minimal",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "toolset": {
+ "value": "v142,host=x64",
+ "strategy": "external"
+ },
+ "architecture": {
+ "value": "x64",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_CXX_COMPILER": "cl.exe",
+ "CMAKE_C_COMPILER": "cl.exe",
+ "CMAKE_PREFIX_PATH": "c:/Qt/6.2.4/msvc2019_64"
+ }
+ }
+ ]
+}
+```
+
+### Options
+
+If you do not have Ninja installed and in the `PATH`, remove `-G Ninja` from
+the first `cmake` call. If you want to build in release mode, change the build
+type to `-DCMAKE_BUILD_TYPE=Release`. You can also build with release
+optimizations but debug information with `-DCMAKE_BUILD_TYPE=RelWithDebInfo`.
+
+You can find more options in the generated CMakeCache.txt file. For instance,
+building of Qbs together with Qt Creator can be enabled with `-DBUILD_QBS=ON`.
+
+Installation is not needed. You can run Qt Creator directly from the build
+directory. On Windows, make sure that your `PATH` environment variable points to
+all required DLLs, like Qt and LLVM. On Linux and macOS, the build already
+contains the necessary `RPATH`s for the dependencies.
+
+If you want to install Qt Creator anyway, that is however possible using
+
+ cmake --install . --prefix /path/to/qtcreator_install
+
+To create a self-contained Qt Creator installation, including all dependencies
+like Qt and LLVM, additionally run
+
+ cmake --install . --prefix /path/to/qtcreator_install --component Dependencies
+
+To install development files like headers, CMake files, and `.lib` files on
+Windows, run
+
+ cmake --install . --prefix /path/to/qtcreator_install --component Devel
+
+If you used the `RelWithDebInfo` configuration and want debug information to be
+available to the installed Qt Creator, run
+
+ cmake --install . --prefix /path/to/qtcreator_install --component DebugInfo
+
+### Perf Profiler Support
+
+Support for the [perf](https://perf.wiki.kernel.org/index.php/Main_Page) profiler
+requires the `perfparser` tool that is part of the Qt Creator source package, and also
+part of the Qt Creator Git repository in form of a submodule in `src/tools/perfparser`.
+
+Compilation of `perfparser` requires ELF and DWARF development packages.
+You can either download and extract a prebuilt package from
+https://download.qt.io/development_releases/prebuilt/elfutils/ and add the
+directory to the `CMAKE_PREFIX_PATH` when configuring Qt Creator,
+or install the `libdw-dev` package on Debian-style Linux systems.
+
+You can also point Qt Creator to a separate installation of `perfparser` by
+setting the `PERFPROFILER_PARSER_FILEPATH` environment variable to the full
+path to the executable.
+
+## Getting LLVM/Clang for the Clang Code Model
+
+The Clang code model uses `Clangd` and the ClangFormat plugin depends on the
+LLVM/Clang libraries. The currently recommended LLVM/Clang version is 14.0.
- Permission to use, copy, modify, distribute, and sell this software and its
- documentation for any purpose is hereby granted without fee, provided that
- the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation.
+### Prebuilt LLVM/Clang packages
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+Prebuilt packages of LLVM/Clang can be downloaded from
+https://download.qt.io/development_releases/prebuilt/libclang/
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- KDEVELOP TEAM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+This should be your preferred option because you will use the version that is
+shipped together with Qt Creator (with backported/additional patches). In
+addition, MinGW packages for Windows are faster due to profile-guided
+optimization. If the prebuilt packages do not match your configuration, you
+need to build LLVM/Clang manually.
-### Open Source tool for generating C++ code that classifies keywords (license MIT)
+If you use the MSVC compiler to build Qt Creator the suggested way is:
+ 1. Download both MSVC and MinGW packages of libclang.
+ 2. Use the MSVC version of libclang during the Qt Creator build.
+ 3. Prepend PATH variable used for the run time with the location of MinGW version of libclang.dll.
+ 4. Launch Qt Creator.
- Roberto Raggi <roberto.raggi@gmail.com>
+### Building LLVM/Clang manually
- QtCreator/src/tools/3rdparty/cplusplus-keywordgen
+You need to install CMake in order to build LLVM/Clang.
- Copyright (c) 2007 Roberto Raggi <roberto.raggi@gmail.com>
+Build LLVM/Clang by roughly following the instructions at
+http://llvm.org/docs/GettingStarted.html#git-mirror:
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
+ 1. Clone LLVM/Clang and checkout a suitable branch
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
+ git clone -b release_130-based --recursive https://code.qt.io/clang/llvm-project.git
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 2. Build and install LLVM/Clang
-### SQLite, in-process library that implements a SQL database engine
+ mkdir build
+ cd build
-SQLite (https://www.sqlite.org) is in the Public Domain.
+ For Linux/macOS:
-### ClassView and ImageViewer plugins
+ cmake \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D LLVM_ENABLE_RTTI=ON \
+ -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \
+ -D CMAKE_INSTALL_PREFIX=<installation location> \
+ ../llvm-project/llvm
+ cmake --build . --target install
- Copyright (C) 2016 The Qt Company Ltd.
+ For Windows:
- All rights reserved.
- Copyright (C) 2016 Denis Mingulov.
+ cmake ^
+ -G Ninja ^
+ -D CMAKE_BUILD_TYPE=Release ^
+ -D LLVM_ENABLE_RTTI=ON ^
+ -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ^
+ -D CMAKE_INSTALL_PREFIX=<installation location> ^
+ ..\llvm-project\llvm
+ cmake --build . --target install
- Contact: http://www.qt.io
+### Clang-Format
- This file is part of Qt Creator.
+The ClangFormat plugin depends on the additional patch
- You may use this file under the terms of the BSD license as follows:
+ https://code.qt.io/cgit/clang/llvm-project.git/commit/?h=release_130-based&id=42879d1f355fde391ef46b96a659afeb4ad7814a
- "Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- * Neither the name of The Qt Company Ltd and its Subsidiary(-ies) nor
- the names of its contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.
+While the plugin builds without it, it might not be fully functional.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+Note that the plugin is disabled by default.
-### Source Code Pro font
+# Licenses and Attributions
- Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
- with Reserved Font Name 'Source'. All Rights Reserved. Source is a
- trademark of Adobe Systems Incorporated in the United States
- and/or other countries.
+Qt Creator is available under commercial licenses from The Qt Company,
+and under the GNU General Public License version 3,
+annotated with The Qt Company GPL Exception 1.0.
+See [LICENSE.GPL3-EXCEPT](LICENSE.GPL3-EXCEPT) for the details.
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
+For more information about the third-party components that Qt Creator
+includes, see the
+[Acknowledgements section in the documentation](https://doc.qt.io/qtcreator/creator-acknowledgements.html).
- The font and license files can be found in QtCreator/src/libs/3rdparty/fonts.