2. Build EUI
Choose either 2.1 or 2.2. Use 2.2 when creating your application; it produces the module directory you will copy into it.
2.1 Try the Gallery
Working directory: the EUI repository root.
Set-Location $euiRoot
cmake -S . -B build/local -G Ninja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_PREFIX_PATH=$qtKit" -DEUI_BUILD_EXAMPLES=ON -DEUI_BUILD_TESTS=OFF
cmake --build build/local
& ./bin/Release/example.exeSuccess: The Gallery opens. Search for EButton, try the buttons, and select Show source and Copy source. The API appears below the examples.
The executable is at $euiRoot/bin/Release/example.exe, with the component module in the adjacent EUI/ directory. Building also copies the module to $qtKit/qml/EUI/; this SDK directory must be writable.
2.2 Build the library for your application
Working directory: the EUI repository root.
Set-Location $euiRoot
cmake -S . -B build/library -G Ninja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_PREFIX_PATH=$qtKit" -DEUI_BUILD_EXAMPLES=OFF -DEUI_BUILD_TESTS=OFF
cmake --build build/library
cmake --install build/library --prefix build/eui-installSuccess: $euiRoot/build/eui-install/imports/EUI/ contains qmldir, euiplugin.dll, and the remaining module files. Copy this complete directory in the next section. These commands build Release; use the same Qt Kit and Release configuration for your application.
2.3 Build with only Qt 6 installed
Qt 5 does not need to be installed. source/qt5 contains the shared QML source. CMake adapts it with Python into source/qt6 inside the current build directory, then compiles the plugin and Gallery using Qt 6. The script preserves the source files, and import EUI 1.0 stays unchanged.
Prepare a Qt 6.5 or newer desktop Kit, its matching C++ compiler, CMake, Ninja, and Python 3. In addition to the library's base modules, install Core5Compat, ShaderTools, Multimedia, and SVG; the Gallery needs WebEngineQuick and WebChannel. Quick3D and QuickTimeline enable the native 3D example with Qt 6.8+. File selection uses Qt Quick Dialogs, calendars use Qt Quick Controls, masking uses Qt5Compat.GraphicalEffects, and shaders are compiled into .qsb files during the build.
Run these commands in the matching compiler's Developer PowerShell, replacing $qtKit with your Qt 6 Kit:
$euiRoot = 'D:/code/EUI'
$qtKit = 'D:/Qt/6.8.3/msvc2022_64'
$env:PATH = "$qtKit/bin;" + $env:PATH
Set-Location $euiRoot
cmake -S . -B build/qt6 -G Ninja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_PREFIX_PATH=$qtKit" "-DQT_DIR=$qtKit/lib/cmake/Qt6" "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$euiRoot/build/qt6/bin" -DEUI_BUILD_EXAMPLES=ON -DEUI_BUILD_TESTS=OFF
cmake --build build/qt6
& ./build/qt6/bin/example.exeTo build only the library, set both EUI_BUILD_* options to OFF, then run cmake --install build/qt6 --prefix build/eui-install-qt6. When following section 3, keep the same $qtKit and copy the module from build/eui-install-qt6/imports/EUI. Use separate build, installation, and application directories for Qt 5 and Qt 6; their euiplugin.dll files are not interchangeable.
Qt 5 and Qt 6 builds require their matching runtime libraries; do not mix DLLs from the two versions.