Skip to content
ispyisail edited this page Sep 11, 2026 · 2 revisions

QElectroTech Erstellen

Anweisungen zum Erstellen von QElectroTech aus Quellcode.

Voraussetzungen

Stellen Sie vor dem Erstellen sicher, dass die richtigen Werkzeuge und Bibliotheken installiert sind.

Qt6 ist die Standardversion. Seit a1c090781 (September 2026) setzt CMakeLists.txt QT_VERSION_MAJOR auf 6, wenn nichts angegeben wird, und der Qt5-Zweig wurde eingestellt. Qt 5.15 hat 2025 das Ende seiner Lebensdauer erreicht. Bauen Sie nur mit Qt5, wenn Sie einen bestimmten Grund haben, indem Sie -DQT_VERSION_MAJOR=5 ΓΌbergeben.

Linux

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 und CUPS β€” siehe Hinweis unten
sudo apt install libsqlite3-dev libcups2-dev

Unter Ubuntu 22.04 werden mΓΆglicherweise zusΓ€tzlich libgl1-mesa-dev und libegl1-mesa-dev benΓΆtigt.

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-devel

Arch Linux :

sudo pacman -S base-devel cmake ninja git qt6-base qt6-svg qt6-tools \
               sqlite libcups

Warum CUPS benΓΆtigt wird

QElectroTech selbst verwendet CUPS nicht. StandardmÀßig kompiliert der Build außerdem zwei KDE-Frameworks-Bibliotheken (KF6CoreAddons, KF6WidgetsAddons) aus dem Quellcode, und diese benâtigen CUPS für die Unterstützung des Druckdialogs. Ohne die Entwicklungs-Header schlÀgt bereits die Konfiguration fehl, bevor überhaupt etwas kompiliert wird:

-- 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

Zwei MΓΆglichkeiten: das CUPS-Entwicklungspaket wie oben installieren, oder die von Ihrer Distribution bereitgestellten KDE-Frameworks-Pakete installieren und mit -DBUILD_KF=NO konfigurieren, damit der Build diese verwendet, statt eigene zu kompilieren.

macOS

  1. Installieren Sie Xcode Command Line Tools :

    xcode-select --install
  2. Installieren Sie AbhΓ€ngigkeiten via Homebrew :

    brew install cmake ninja git qt
    # oder fΓΌr Qt6 :
    brew install cmake git qt
  3. Setzen Sie Qt-Pfad (wenn nΓΆtig) :

    export Qt6_DIR=$(brew --prefix qt)/lib/cmake/Qt6
    # oder fΓΌr Qt6 :
    export Qt_DIR=$(brew --prefix qt)/lib/cmake/Qt6

Windows

Option 1 : Visual Studio (Empfohlen)

  1. Installieren Sie Visual Studio Community (kostenlos)
    • WΓ€hlen Sie "Desktop development with C++"
    • EnthΓ€lt MSVC-Compiler
  2. Installieren Sie CMake von cmake.org
  3. Installieren Sie Qt5 oder Qt6 von qt.io
    • WΓ€hlen Sie "MSVC 2019 64-bit" (oder 2022)

Option 2 : MinGW (Alternative)

  1. Installieren Sie MinGW mit C++-UnterstΓΌtzung
  2. Installieren Sie CMake
  3. Installieren Sie Qt5 (MinGW-Build)

Option 3 : WSL (Windows Subsystem for Linux)

  1. Aktivieren Sie WSL2
  2. Installieren Sie Ubuntu in WSL
  3. Folgen Sie Linux-Anweisungen oben

Git und Quellcode

Klonen Sie das Repository mit Submodulen :

git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git
cd qelectrotech-source-mirror

Die --recursive-Flagge ist wichtig um alle AbhΓ€ngigkeiten zu erhalten.


Aus Quelle Erstellen

Schritt 1 : Repository Klonen

git clone https://github.com/qelectrotech/qelectrotech-source-mirror.git
cd qelectrotech-source-mirror

Schritt 2 : Build Konfigurieren

mkdir build && cd build
cmake ..

Schritt 3 : Kompilieren

cmake --build . --config Release

Oder verwenden Sie das Build-Tool Ihrer Plattform :

Linux/macOS :

make -j$(nproc)

Windows (MSVC) :

cmake --build . --config Release --parallel

Schritt 4 : Installieren (Optional)

cmake --install .

Oder fΓΌhren Sie die BinΓ€rdatei aus dem Build-Verzeichnis aus.


Build-Varianten

Debug-Build

cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .

Mit AddressSanitizer (ASAN)

cmake -DCMAKE_CXX_FLAGS="-fsanitize=address" ..
cmake --build .

Mit ThreadSanitizer (TSan)

cmake -DCMAKE_CXX_FLAGS="-fsanitize=thread" ..
cmake --build .

Tests

Tests AusfΓΌhren

cd build
ctest

Oder mit AusfΓΌhrlichkeit ausfΓΌhren :

ctest --verbose

Fehlerbehebung

Problem : Could NOT find Cups

-- 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

Lâsung : Der Build kompiliert standardmÀßig zwei KDE-Frameworks-Bibliotheken aus dem Quellcode, und diese benâtigen CUPS. Installieren Sie das Entwicklungspaket (libcups2-dev, cups-devel oder libcups, je nach Distribution), oder konfigurieren Sie mit -DBUILD_KF=NO, um die KDE-Frameworks-Pakete Ihrer Distribution zu verwenden.

Problem : The following REQUIRED packages have not been found: Qt6

Meist ein veralteter AbhΓ€ngigkeits-Cache und kein fehlendes Paket β€” tritt am hΓ€ufigsten nach der Umstellung auf Qt6 auf, in einem Baum, der zuvor fΓΌr Qt5 konfiguriert war.

Lâsung : Die heruntergeladenen AbhÀngigkeiten werden außerhalb des Build-Verzeichnisses in ~/.cache/qet-deps zwischengespeichert. Das Lâschen allein des Build-Verzeichnisses leert diesen Cache nicht: Die zwischengespeicherten Extra CMake Modules bleiben für die alte Qt-Version konfiguriert und schlagen fehl, weil sie die neue verlangen.

rm -rf ~/.cache/qet-deps build/
cmake -S . -B build -G Ninja

Problem : CMake findet Qt nicht

LΓΆsung :

cmake -S . -B build -DCMAKE_PREFIX_PATH=/pfad/zu/Qt/6.x.x/gcc_64

Unter macOS mit Homebrew: export Qt6_DIR=$(brew --prefix qt)/lib/cmake/Qt6.

Problem : Vermischte Qt-Versionen

INTERFACE_QT_MAJOR_VERSION of "Qt5::Core" does not agree with QT_MAJOR_VERSION bedeutet, dass ein Teil des Builds Qt5 und ein anderer Qt6 gefunden hat.

LΓΆsung : Konfigurieren Sie aus einem leeren Build-Verzeichnis und ΓΌbergeben Sie -DQT_VERSION_MAJOR, damit die Wahl explizit ist.

Problem : "Permission denied" auf Linux

LΓΆsung :

sudo chown -R $USER:$USER .

Problem : Build sehr langsam

LΓΆsungen :

  • Ninja statt Make verwenden : cmake -GNinja ..
  • Parallelisierung erhΓΆhen : cmake --build . -j8
  • ccache verwenden : cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..

NΓ€chste Schritte

Nach dem Erstellen von QET :

  1. App testen : ./qelectrotech (oder Windows/macOS-Executable)
  2. Tests ausfΓΌhren : ctest
  3. Code lesen : Erkunden Sie das Verzeichnis sources/
  4. Beitragen : Siehe Zu QET Beitragen

ZusΓ€tzliche Ressourcen


🌐 Sprache wΓ€hlen β€” English Β· FranΓ§ais Β· Deutsch

Getting Started

Home

🌐 Languages β€” English Β· FranΓ§ais Β· Deutsch

Downloads

Windows without admin rights β€” the portable archive, no installer

Quick Start Guide

User Manual

FAQ

Tips & Tricks

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

Generic devices β€” a quick box symbol with terminals on any side, made by a wizard (pending)

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

File formats
Elements XML
Project XML
Development

Building from Source

Contributing Code

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

Development Roadmap

Vision β€” proposal, under discussion

Developer Tools

About

Features

History

Community

License

Contributing to this Wiki

Clone this wiki locally