Repository navigation
element_editor
Linking elements documents the .elmt file that
results from element authoring β master/slave/terminal, contact groups,
information flags. This page documents the other half: actually drawing an
element in QET's built-in editor.
Source: sources/editor/ (~22,900 lines) β qetelementeditor.cpp (the
window), elementscene.cpp (the canvas), graphicspart/ (one class per
drawable primitive), esevent/ (the interactive placement tools), ui/ (the
property panels).
New element opens a three-step wizard:
- Parent category β where in the collection tree the element will live.
-
File name β the
*.elmtextension is added automatically if you leave it off. - Name(s) β the element's display name, one per language; only your current UI language is required, the rest can be filled in later.
The editor opens on an empty canvas. There is no separate "set the element's size" step β see Β§3.
You can also open an existing element to edit it, or start from a DXF file imported as line art into a new element via File β Import a DXF file β a way to trace CAD geometry rather than draw from scratch.
One toolbar button per primitive type:
| Tool | Draws |
|---|---|
| Line | a straight segment |
| Rectangle | click-drag a corner-to-corner rectangle |
| Ellipse | click-drag a bounding box |
| Polygon | click each vertex; double-click to finish, right-click to undo the last point |
| Arc | a circular arc |
| Text | a fixed label, not editable once placed on a diagram |
| Dynamic text field | a text item that can be edited per-instance on a diagram β this is what element information and formula variables attach to, see Variables & formulas |
| Terminal | a connection point |
A terminal needs an orientation β which side of the body it points out of, and therefore which direction a wire may approach it from. While placing one, press Space to rotate it through the four cardinal directions before clicking to commit.
After you place a terminal, the tool immediately starts another one at the same orientation β convenient for a row of same-facing pins. Right-click ends the tool.
Terminal type and function (generic, fuse, diode, groundβ¦) are set afterward in the terminal's own properties, not while placing it β see Linking elements Β§4.
Give every terminal a name in its properties too, and never the same name twice in one symbol β see Β§5, Terminal names.
There is no dialog where you enter the element's width, height or hotspot. They are derived automatically from whatever you've drawn, recalculated on every save:
- The bounding rectangle of every primitive on the canvas is measured.
- Width and height are rounded up to the next multiple of 10 β with a quirk: if the remainder is more than 6, it rounds up an extra ten. A drawing 42 px wide becomes 50 (this is the exact case Elements XML uses as its rounding example β now you know where the number comes from).
- The hotspot is placed at the centre of that rounded bounding box.
If your drawing doesn't straddle the scene's origin point (0,0), QET
re-centres every primitive on save so that it does β parts actually move
on the canvas, not just in the saved coordinates. Draw comfortably near the
crosshair at the canvas centre and this never surprises you; draw far off to
one side and a save can visibly shift everything.
Three related actions, easy to confuse:
| Action | Destination |
|---|---|
| Save | wherever the element was opened from β a collection location if opened from the elements panel, a plain file path if opened by file |
| Save As | asks for a collection location (category + name), the normal way to save a new element into your custom collection |
| Save As File | asks for a plain filesystem path, outside any collection |
All three run the same validation first (Β§5); a failed check blocks the save and none of them writes anything.
QET validates the element and reports problems as either a warning (save proceeds) or an error (save is blocked):
| Condition | Severity |
|---|---|
| No terminals at all | warning β unless the element is a sheet report, a conductor definition, or a thumbnail, which are allowed to have none |
| A sheet report element has anything other than exactly one terminal | error |
| A conductor definition element has anything other than exactly one terminal | error |
An element with zero terminals still saves β you'll just get a dialog telling you it can't be wired to anything, which is sometimes exactly what you want (a thumbnail, a text block, a title-block decoration).
Every terminal of a symbol should have a name, and no two terminals of the
same symbol may share one. The wiring list (what connects to what) names each
end of a wire as symbol label : terminal name, so two terminals both called
N on -K1 give two different wires the same address, -K1:N, and nobody
wiring the panel can tell them apart. IEC 61666 Β§4.1 states the rule: "Each
terminal shall be unambiguously identified with respect to the object
itself."
| Condition | Severity |
|---|---|
| Two or more terminals share a name | error β the save is blocked, and the terminals involved are selected so you can find them |
| One or more terminals have no name | warning β the save goes ahead. Sheet reports, conductor definitions and thumbnails are not checked |

How names are compared:
- Spaces at the start and end are ignored:
PEandPEare the same name. - Case counts:
nandNare different names. - Unnamed terminals are counted as unnamed, never as duplicates of each other.
Real devices sometimes print the same marking twice. Some Shelly relays
have two terminals marked N or two marked L, bridged inside the device. The marking on the device is still not enough
for the drawing: IEC 61666 Β§4.2 says that when the manufacturer's marking is
insufficient to tell terminals apart, you assign your own designations and
explain them. Give each one a distinct name that keeps the printed marking,
for example N.1 and N.2.

Configuration β Configurer QElectroTech β GΓ©nΓ©ral β Editor β VΓ©rifier les noms des bornes Γ l'enregistrement (Check terminal names when saving). It is on by default. Unticked, neither the error nor the warning appears and every symbol saves as before.

The setting belongs to your QElectroTech installation, not to the symbol or
the project. The command-line check (--check-elements, see
Automating QElectroTech) ignores it and always checks
names.
| Panel | What it gives you |
|---|---|
| Parties | every primitive in the element, as a list. Selecting in the list selects on the canvas and the other way round β the reliable way to reach a primitive buried under another one |
| Profondeur | the stacking order. A filled shape drawn last hides what is under it; this is where you push it back |
| Status bar | a live X / Y readout of the pointer, in the element's own coordinates |
The parts list gives up past 200 primitives. Above that it shows "Trop de primitives, liste non gΓ©nΓ©rΓ©e" with the count instead of the list, because building it for a very complex element is slow. The element is fine and still editable β only the list is withheld. The ceiling is the setting
elementeditor/max-parts-element-editor-list, so it can be raised if you routinely draw elements that big.
The canvas is an endless grid of dots, which gives nothing to judge how big a symbol will look on a real sheet. Affichage βΈ Afficher le cadre de fond (View βΈ Show background frame), also a button on the view toolbar, draws a dashed frame centred on the symbol's origin, the size of a default sheet's drawing area: 1020 Γ 640.
Affichage βΈ Taille du cadre de fond... (Background frame size) sets another width and height, for example the size of one cell or of the space a symbol usually gets. Both settings are remembered between sessions; the frame is off by default.

The frame is only drawn on screen. It is not saved in the symbol, and it does not appear in an SVG export.
Since PR #1164 (merged 2026-09-29).
| Action | What it does |
|---|---|
| Importer un Γ©lΓ©ment Γ redimensionner | opens another .elmt and brings it in scaled by any X and Y factor, using the separate QET_ElementScaler program (asked for if it is not installed) β the way to build a variant of an existing symbol rather than redrawing it. To scale the element you have open and keep its terminals on the grid, see Β§8 |
| Importer un fichier dxf | brings DXF geometry in as primitives β see DXF import & export |
| Exporter en SVG | writes the element out as an SVG image, for documentation rather than for QElectroTech |
| Recharger l'Γ©lΓ©ment | re-reads the element from disk. If you have unsaved changes it warns first, and says plainly that reloading loses them |
An element opened from a collection you cannot write to opens read-only: the title bar says so, and saving is refused. Use Save as to put a copy somewhere writable β see Managing collections for which collections are writable.
Select a primitive and drag its handles. The modifiers are the same ones the diagram editor uses, and they are worth knowing here because the element editor is where you use them most:
| Hold | While dragging |
|---|---|
| Ctrl | ignore the grid β fine positioning |
| Shift | keep proportions when resizing; snap to 15Β° when rotating or skewing |
| Alt on a corner | turn a rectangle or an ellipse into a polygon, so each corner moves on its own |
The full list is on Mouse modifiers.
Status: pending. This section describes PR #1378, not yet merged. Nothing here works until that lands β check the PR before trying any of this against your own build. This section will drop this notice once it does.
Γdition β Mettre l'Γ©lΓ©ment Γ l'Γ©chelleβ¦ (Edit β Scale elementβ¦) scales every part at once by Γ0.5 to Γ4, offering only the factors that keep the terminals on the grid. Texts, terminal names and arrows scale with it, and one undo restores the element. Which factors you get, and why, is on Grid size and element size Β§4.
- PLC master tables. Setting a master element's type to PLC replaces the usual contact-budget controls with an interactive I/O table β see Linking elements Β§5. No element in the shipped collection currently uses this.
- Line style (weight, colour, dash pattern) is set per-primitive from its own properties panel, not the toolbar.
- Grid and snap work the same way as the diagram editor.
See also: Linking elements Β· Elements XML Β· DXF import & export Β· Variables & formulas Β· Mouse modifiers Β· Managing collections Β· Grid size and element size
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
