Repository navigation
building
Instructions for building QElectroTech from source code.
Before building, ensure you have the right tools and libraries installed.
Qt6 is the default. As of
a1c090781(September 2026)CMakeLists.txtsetsQT_VERSION_MAJORto 6 when nothing is specified, and the Qt5 track has been retired. Qt 5.15 reached end of life in 2025. Build with Qt5 only if you have a specific reason, by passing-DQT_VERSION_MAJOR=5.
Ubuntu/Debian:
sudo apt update
sudo apt install build-essential cmake ninja-build git pkg-config
# Qt6
sudo apt install qt6-base-dev qt6-base-private-dev libqt6svg6-dev \
libqt6sql6-sqlite qt6-tools-dev qt6-tools-dev-tools \
qt6-l10n-tools libqt6pdf6 qt6-pdf-dev
# SQLite, and CUPS -- see the note below on why CUPS is needed
sudo apt install libsqlite3-dev libcups2-devOn Ubuntu 22.04 you may also need libgl1-mesa-dev and libegl1-mesa-dev.
Fedora/RHEL:
sudo dnf groupinstall "Development Tools"
sudo dnf install cmake ninja-build git qt6-qtbase-devel qt6-qtsvg-devel \
qt6-qttools-devel sqlite-devel cups-develArch Linux:
sudo pacman -S base-devel cmake ninja git qt6-base qt6-svg qt6-tools \
sqlite libcupsQElectroTech itself does not use CUPS. By default the build also compiles two
KDE Frameworks libraries (KF6CoreAddons, KF6WidgetsAddons) from source, and
those require CUPS for print-dialog support. Without the development headers,
configuring fails before anything is compiled:
-- Could NOT find Cups (missing: CUPS_LIBRARIES CUPS_INCLUDE_DIR)
CMake Error at .../FeatureSummary.cmake:869 (message):
feature_summary() Error: REQUIRED package(s) are missing, aborting CMake
Two ways out: install the CUPS development package as above, or install the KDE
Frameworks packages your distribution provides and configure with
-DBUILD_KF=NO so the build uses those instead of compiling its own.
-
Install Xcode Command Line Tools:
xcode-select --install
-
Install dependencies via Homebrew:
brew install cmake ninja git qt
Homebrew's
qtformula is Qt6.qt@5is only needed for a deliberate Qt5 build. -
Set Qt path (if needed):
export Qt6_DIR=$(brew --prefix qt)/lib/cmake/Qt6
Option 1: Visual Studio (Recommended)
- Install Visual Studio Community (free)
- Select "Desktop development with C++"
- Includes MSVC compiler
- Install CMake from cmake.org
- Install Qt6 from qt.io
- Choose "MSVC 2019 64-bit" (or 2022)
Option 2: MinGW (Alternative)
- Install MinGW with C++ support
- Install CMake
- Install Qt6 (MinGW build)
Option 3: WSL (Windows Subsystem for Linux)
- Enable WSL2
- Install Ubuntu in WSL
- Follow Linux instructions above
Clone the repository with submodules:
git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git
cd qelectrotech-source-mirrorThe --recursive flag is important to get all dependencies.
git clone https://github.com/qelectrotech/qelectrotech-source-mirror.git
cd qelectrotech-source-mirrormkdir build && cd build
cmake ..cmake --build . --config ReleaseOr use your platform's build tool:
Linux/macOS:
make -j$(nproc)Windows (MSVC):
cmake --build . --config Release --parallelcmake --install .Or run the binary from the build directory.
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .cmake -DCMAKE_CXX_FLAGS="-fsanitize=address" ..
cmake --build .cmake -DCMAKE_CXX_FLAGS="-fsanitize=thread" ..
cmake --build .Off by default. Turn it on with -DQET_ENABLE_SPACEMOUSE=ON; it needs
libspnav or hidapi, and builds without the feature (with a warning) if neither
is found:
cmake -DQET_ENABLE_SPACEMOUSE=ON -DQET_SPACEMOUSE_BACKEND=hid ..Backends, packages and what each needs at run time: 3D mouse, Β§7.
-- Could NOT find Cups (missing: CUPS_LIBRARIES CUPS_INCLUDE_DIR)
CMake Error at .../FeatureSummary.cmake:869 (message):
feature_summary() Error: REQUIRED package(s) are missing, aborting CMake
The build compiles two KDE Frameworks libraries from source by default, and
they need CUPS. Install the development package (libcups2-dev,
cups-devel, or libcups depending on distribution), or configure with
-DBUILD_KF=NO to use your distribution's KDE Frameworks packages instead.
Usually a stale dependency cache rather than a missing package β most often seen after the Qt6 default landed, on a tree that had previously been configured for Qt5.
The fetched dependencies are cached outside the build directory, in
~/.cache/qet-deps. Deleting the build directory alone does not clear it, so
the cached Extra CMake Modules stay configured for the old Qt version and
fail demanding the new one. Remove the cache and configure again:
rm -rf ~/.cache/qet-deps build/
cmake -S . -B build -G NinjaPoint CMake at the Qt installation explicitly:
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/Qt/6.x.x/gcc_64On macOS with Homebrew, export Qt6_DIR=$(brew --prefix qt)/lib/cmake/Qt6.
INTERFACE_QT_MAJOR_VERSION of "Qt5::Core" does not agree with QT_MAJOR_VERSION means parts of the build found Qt5 and parts found Qt6.
Configure from a clean build directory and pass -DQT_VERSION_MAJOR so the
choice is explicit rather than inferred.
See the project's Dockerfile for containerized builds:
docker build -t qelectrotech:release .
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix qelectrotech:releaseTips for speeding up compilation
Using multiple cores for faster compilation
Only rebuilding changed files
After building, run the test suite:
ctestOr:
make testSee Contributing for guidelines on submitting code changes.
- Forum β Build problems discussion
- Issues β Report build-related bugs
- Developer Docs β Architecture reference
Getting Started
π Languages β English Β· FranΓ§ais Β· Deutsch
Windows without admin rights β the portable archive, no installer
Guides
Conductors β wire properties, what feeds which export, cables, and hops where wires cross
Wires per terminal β limit the wires on a terminal, chain wiring instead of stars
Printing and exporting β paper, PDF, images, and what each path does differently
Linking elements β master, slave, terminal
PLC modules β I/O tables and linking a wire to a specific point
Using the element editor β drawing tools, saving, checks
Grid size and element size β why symbols aren't all the same scale, and scaling one without leaving the grid
Preferences reference β what each settings page does
Saving and loading settings β your whole setup in one file, to copy or keep
Keyboard-only control β mouseless QET, and what still needs a mouse
Mouse modifiers β what Shift, Ctrl and Alt change while you drag
3D mouse β SpaceMouse pan, zoom and buttons
Aligning items β snap symbols back to the grid, or line them up
Pictures on a sheet β labels, crop, transparency, what they cost in the file
Arcs and curved wires β the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts
Grouping items β select, move and copy several items as one
Finding your place on a sheet β go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan
Showing and hiding kinds of items β hide texts, wire numbers, shapes, pictures, tables or cross-references on every sheet
Drawing faster β place without dragging, the S shortcut bar, command search, gestures
Customising QElectroTech β keys, toolbar size and contents, the gesture ring (partly pending)
Managing collections β folders, writability, building your own shortlist
Templates β reusable multi-element blocks, placed by double-click or drag
Search & Replace β bulk property changes
Building a nomenclature query β the BOM/summary table builder
Linking wires across pages β sheet reports
Variables & formulas β %f, %{label}, sequences
Auto-numbering β schemes, sequences, freezing
Terminal strips β strips, levels, bridges
Title block templates β the .titleblock format
Importing EPLAN parts (.edz) β EPLAN Data Portal
DXF import & export β two unrelated features, one format; command-line export and layers
The project database β the in-memory SQLite cache
Development
Automating QET β CLI, XML formats, external tools
CLI Reference β command line usage
JavaScript Scripting β --run, geometry editing, undo
MCP server β let an AI assistant read, verify and edit projects
Connecting an AI assistant β setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio
Script buttons β stored scripts with an icon, by hand or by an assistant
Live mode β an assistant working in the open project while you watch
Macro recorder β record a task by hand, for an assistant to script
Vision β proposal, under discussion
