1. Prerequisites
1.1 Install the tools and open a terminal
- Install the Visual Studio 2019 C++ development tools and use an x64 compilation environment.
- Install the Qt 5.15.2
msvc2019_64Kit with the modules listed below. - Install CMake 3.20 or newer and Ninja, and add them to PATH.
- Open Developer PowerShell for VS 2019. Run the remaining commands in this window.
| Purpose | Qt modules or files |
|---|---|
| Build the library | Core, Gui, Qml, Quick, Widgets, Network, Concurrent, PrintSupport, and matching GuiPrivate and QmlPrivate private development headers |
| Build the Gallery | Library dependencies plus WebEngine and WebChannel |
| Minimal application in this chapter | QtQuick 2.15, QtQml 2.15, QtQuick.Window 2.15, QtQuick.Controls 2.15, QtGraphicalEffects 1.15 |
| Additional controls as needed | Qt.labs.calendar for date panels; QtQuick.Dialogs for file dialogs; QtMultimedia for media; QtWebEngine and QtWebChannel for EECharts; the SVG image-format plugin for SVG icons |
Run cmake --version, ninja --version, and cl to confirm the tools are available. Running cl without arguments should display its version and usage.
1.2 Set repository and Qt paths
Replace the two paths with your actual directories:
powershell
$euiRoot = 'D:/code/EUI'
$qtKit = 'D:/Qt/5.15.2/msvc2019_64'
$env:PATH = "$qtKit/bin;" + $env:PATH
Set-Location $euiRoot$euiRoot is this repository, containing the root CMakeLists.txt and source/. $qtKit contains Qt's bin/, lib/, and qml/ directories. Later commands reuse these variables; repeat this section after opening a new terminal.