Repository navigation
grid_and_element_size
Elements from different sub-collections β or different authors β can look very different in size next to each other on the same sheet, even though they all snap correctly to the same grid. New users sometimes read this the way model railway modellers read gauges: N, HO, and O scale are all "the same kind of thing" (a train) drawn at deliberately different, named miniaturization ratios. QET has no equivalent. There is no small set of named element scales, and no dialog anywhere that lets you pick one. What exists instead is one grid unit (a spacing convention, not a physical size) and a shipped collection where every author picked their own multiple of it. This page explains both halves: the grid itself, and why symbol size still varies as much as it does.
Source: sources/diagram.cpp, sources/diagram.h, sources/editor/elementscene.cpp,
sources/ui/configpage/generalconfigurationpage.cpp.
The sheet grid is a set of dots at regular intervals, purely for visual
alignment and mouse-snap β it carries no unit of measurement (not mm, not
inches). Seven settings control it, all under QSettings key prefix
diagrameditor/:
| Setting | QSettings key | Default | Controls |
|---|---|---|---|
| X grid spacing | Xgrid |
10 | horizontal dot spacing / snap step |
| Y grid spacing | Ygrid |
10 | vertical dot spacing / snap step |
| X keyboard-nudge step | key_Xgrid |
10 | how far β and β move a selection |
| Y keyboard-nudge step | key_Ygrid |
10 | how far β and β move a selection |
| X fine-nudge step | key_fine_Xgrid |
1 | β / β step while the fine-movement modifier is held |
| Y fine-nudge step | key_fine_Ygrid |
1 | β / β step while the fine-movement modifier is held |
| Text grid | text_grid_divisor |
1 | dragged texts snap to the grid divided by this: 1, 2, 5 or 10; 0 turns the snap off |
All seven are exposed on the General page of Configuration β Configurer QElectroTech (see Preferences reference Β§1, "Grid and keyboard movement"). The in-app spin boxes cap X/Y grid spacing at 1β30; there is no upper cap in the underlying setting itself, only in that dialog.
Two more settings β grid_pointsize_min and grid_pointsize_max, both
defaulting to 1 β control how thick the grid dots are drawn, ramped between
the two values as you zoom in from 100% up to 500% (Diagram::drawGrid()).
This is purely cosmetic: it does not change spacing or snap behaviour, only
how visible the dots are at a given zoom level.
Mouse-drag movement snaps to Xgrid/Ygrid, independent of the
keyboard-nudge settings above; Ctrl while dragging bypasses the snap. Texts
are the exception: they snap to the text grid, the sheet grid divided by
text_grid_divisor, so a label can sit between two grid points and still
line up with the labels of other symbols. The default of 1 is the sheet grid
itself. See Mouse modifiers Β§2 for where to change it
and for the full modifier table.
The element editor (Edit element / drawing your own symbol β see
Using the element editor) works on its own 1Γ1 fine
grid by default (ElementScene::setGrid(1, 1)), letting you place a line
or terminal at any integer coordinate while you draw. That fine positioning
does not carry over to the saved element, though:
On save, ElementScene rounds the element's bounding box up to the next
multiple of 10 in both width and height (with an extra +10 if the
remainder already exceeds 6, so it rounds to the nearer multiple of 10,
not always up):
int upwidth = ((qRound(size.width())/10)*10)+10;
if ((qRound(size.width())%10) > 6)
upwidth += 10;and the same for height. The padding needed to reach that size is split out
as a margin, and the whole element is written to .elmt with width and
height attributes that are always multiples of 10 β the same 10 that is
the diagram grid's default spacing. An element's hotspot always lands on a
grid intersection once it's placed on a sheet. The rounding does not reach
the terminals, though: a terminal is only on a grid point if it was drawn a
whole number of grid steps from the hotspot. In the shipped collection
(checked 2026-10-08), 3,287 of the 6,080 elements that have terminals have
all of them on the 10-unit grid; the other 2,793 have at least one
terminal between grid points, so a wire drawn straight to it from a
neighbouring element bends.
If you've changed Xgrid/Ygrid away from 10, note that the element
editor's own rounding is still hard-coded to 10 β an element built on a
sheet with a 12-unit grid, say, will not necessarily land back on that
grid's intersections.
Rounding to a multiple of 10 says nothing about which multiple. A survey
of the shipped elements/ collection (8,838 .elmt files) shows every
<definition> width/height is indeed a multiple of 10 β but the multiple
chosen ranges enormously:
| Element | File | Size (grid units) |
|---|---|---|
| Mechanical lock (auxiliary symbol) | 10_electric/98_graphics/01_auxiliary_symbols/verrouillage-meca.elmt |
20 Γ 20 |
| WAGO 750-1606 I/O module | 10_electric/20_manufacturers_articles/wago/.../wago_0750-1606-0040-0000.elmt |
740 Γ 110 |
That's a 35Γ difference in linear footprint between two ordinary elements,
both perfectly grid-aligned. It isn't an outlier: dimension pairs like
30Γ30, 40Γ20, 60Γ60, and 140Γ310 are all common across the
collection in the hundreds, because each contributor drew their symbol at
whatever size looked right to them, at whatever level of physical detail
they were rendering (a single auxiliary-contact glyph vs. a full
manufacturer footprint traced from a datasheet). There's no schema field,
naming convention, or qet-lint rule (checked in tools/qet-lint/) that
enforces or even flags a consistent size within a symbol family β the
mechanical-lock-sized problem is a purely visual one you only notice once
two mismatched elements sit on the same sheet.
Practical takeaway: don't expect elements from different sub-collections
β or the same sub-collection at different manufacturer generations β to
read at a consistent visual scale just because they're both grid-aligned.
If a diagram's symbols look inconsistently sized after adding a new part
from a different collection, that's expected behavior, not a bug: check the
element's width/height in its .elmt file (or via Edit element)
against neighbouring symbols. To make one bigger or smaller without taking
its terminals off the grid, see Β§4.
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.
In the element editor, Γdition β Mettre l'Γ©lΓ©ment Γ l'Γ©chelleβ¦ (Edit β Scale elementβ¦, the last item of the menu) scales the whole element by one factor. It only offers the factors that keep every terminal on the 10-unit grid, so wires to the scaled element stay straight.

How the factors are chosen. The candidates are Γ0.5, Γ1.5, Γ2, Γ2.5, Γ3 and Γ4. The element is scaled about its hotspot, so a terminal at (x, y) moves to (x Γ factor, y Γ factor). A factor is offered only if that lands every terminal on a multiple of 10. In practice:
| Terminals today | Factors offered |
|---|---|
| all a multiple of 20 from the hotspot | all six |
| all a multiple of 10, some not of 20 | Γ2, Γ3, Γ4 |
| some 5 units off the grid | Γ2, Γ4 β these bring them on to the grid |
| some off by another amount (1, 2, 7 β¦) | none: the dialog says so and OK is greyed out |
| no terminals at all (a front view, a logo) | all six |

For the shipped collection, Γ2 and Γ3 are always offered for an element whose terminals are on the grid. Γ0.5 and Γ1.5 are offered for about a quarter of them. Making elements smaller is usually not possible this way.
The grid is fixed at 10 here, whatever Xgrid/Ygrid are set to in your preferences: elements are shared between users, and the collection is drawn to 10.
What scales:
| Part | What happens |
|---|---|
| lines, rectangles, circles, ellipses, arcs, polygons | size and position Γ factor, the same as dragging the selection handles |
| arrows and other line ends | their length Γ factor |
| terminals | position Γ factor; a terminal's displayed name moves out with it (its offset Γ factor, its font as for texts) |
| texts and dynamic text fields | position Γ factor; with Mettre aussi les textes Γ l'Γ©chelle (scale texts too, ticked by default) the font size too, rounded to a whole point and never below 4 pt |
| line thickness | unchanged β thickness is chosen from a short list of styles, not set as a size |
Undo. The whole change is one step in the undo list (mise Γ l'Γ©chelle de l'Γ©lΓ©ment); one Ctrl+Z puts every part back.
Projects that already use the element. A project keeps its own copy of each element, so nothing changes in a project until you update the element there. Terminals keep their uuid when scaled. After updating, check the wires to that element, since its terminals are now somewhere else.
Compared with Importer un Γ©lΓ©ment Γ redimensionner. The element
editor's Fichier menu already has Importer un Γ©lΓ©ment Γ redimensionner
(import an element to resize). That runs plc-user's separate
QET_ElementScaler program,
which you install first. It takes any X and Y factor, with no grid check,
and brings in another .elmt file. Use it for free or uneven scaling. Use
Mettre l'élément à l'échelle⦠to scale the element you have open while
keeping its wires straight.
- Preferences reference β where the grid settings live in the UI
- Using the element editor β drawing tools, saving, checks
- Mouse modifiers β Shift/Ctrl/Alt while dragging
- Aligning items β putting symbols that left the grid back on it
-
Elements XML β the
<definition>width/height/hotspotattributes
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
