#separator:tab
#html:false
front	back	tags
What is CMAKE_AUTOMOC?	CMake target property that scans C++ headers and sources for Q_OBJECT or Q_GADGET macros and schedules moc code generation before compilation.	course:linux-qt-core-widgets glossary
What is Event filter?	Pre-target interception hook installed via QObject::installEventFilter allowing a watcher QObject to inspect and consume QEvent instances before target::event executes.	course:linux-qt-core-widgets glossary
What is Implicit sharing?	Copy-on-write buffer management in Qt value types such as QByteArray and QString where copies share an atomic reference count until a mutator detaches private storage.	course:linux-qt-core-widgets glossary
What is ItemDataRole?	Enumeration selector passed to QAbstractItemModel::data (such as Qt::DisplayRole or Qt::UserRole) identifying which facet of a backing record to return.	course:linux-qt-core-widgets glossary
What is PMF connect?	Compile-time checked QObject::connect overload accepting C++ pointers to member functions so signal-to-slot signature compatibility is verified during template instantiation.	course:linux-qt-core-widgets glossary
What is Premultiplied ARGB32?	32-bit pixel format storing red, green, and blue channels pre-scaled by alpha/255 so Porter-Duff SourceOver blending avoids per-pixel division.	course:linux-qt-core-widgets glossary
What is QMetaObject?	Static per-class descriptor storing class names, signal/slot signatures, and the static metacall entry point used for runtime introspection and signal activation.	course:linux-qt-core-widgets glossary
What is QModelIndex?	Lightweight transient coordinate holding row, column, internal pointer, and model pointer used by views and delegates to query cell data roles.	course:linux-qt-core-widgets glossary
What is QSaveFile?	Transactional file writer that writes to a sibling temporary file, flushes storage via fsync, and atomically renames over the destination inside commit().	course:linux-qt-core-widgets glossary
What is QSignalBlocker?	RAII scope guard that saves a QObject's prior signalsBlocked state, suppresses signal emission during programmatic widget updates, and restores the prior flag on destruction.	course:linux-qt-core-widgets glossary
What is QSignalSpy?	QtTest verification helper that attaches to a QObject signal and records every emitted argument pack into an inspectable list for automated assertions.	course:linux-qt-core-widgets glossary
What is QSizePolicy?	Per-axis layout descriptor pairing growth/shrink flags (Fixed, Minimum, Preferred, Expanding) with integer stretch weights consumed by geometry solvers.	course:linux-qt-core-widgets glossary
What is QSortFilterProxyModel?	Intermediate item model mapping source QModelIndex rows and columns to filtered or sorted view indices without duplicating backing telemetry records.	course:linux-qt-core-widgets glossary
What is Qt::PreciseTimer?	Monotonic timer mode requesting millisecond-accurate OS wakeups instead of coalescing deadlines within a coarse 5% window.	course:linux-qt-core-widgets glossary
What is RAII?	Resource Acquisition Is Initialization: binding resource lifetime to a stack-scoped C++ object whose destructor deterministically releases the handle on scope exit.	course:linux-qt-core-widgets glossary
What is Rule of Five?	C++ special-member discipline requiring explicit or defaulted destructor, copy/move constructors, and copy/move assignments whenever a class manages an owning handle.	course:linux-qt-core-widgets glossary
What is moc?	Qt Meta-Object Compiler: build-time C++ generator that parses Q_OBJECT classes and emits string tables, method indices, and qt_static_metacall dispatchers.	course:linux-qt-core-widgets glossary
What is qt_metacall?	Virtual dispatch entry generated by Q_OBJECT that routes integer method indices and a void** argument vector to concrete C++ member functions.	course:linux-qt-core-widgets glossary
What is vtable?	Compiler-emitted per-class table of function pointers indexed through an object's hidden vptr to resolve virtual member calls and polymorphic destruction at runtime.	course:linux-qt-core-widgets glossary
Complete the statement (fact: con_m01_l01_1, con_m01_l01_2, con_m01_l01_3): Enabling `CMAKE_AUTOMOC`, `CMAKE_AUTOUIC`, and `CMAKE_AUTORCC` as targ…	Enabling `CMAKE_AUTOMOC`, `CMAKE_AUTOUIC`, and `CMAKE_AUTORCC` as target properties schedules `moc`, `uic`, and `rcc` in the CMake build graph automatically whenever headers, `.ui` forms, or `.qrc` manifests change.	course:linux-qt-core-widgets ku fact lesson:m01-l01
Complete the statement (fact: con_m01_l01_1, con_m01_l01_2, con_m01_l01_3): Linking imported targets such as `Qt6::Widgets` via `target_link_libra…	Linking imported targets such as `Qt6::Widgets` via `target_link_libraries` propagates transitive include paths, compile definitions, and `-fPIC` flags without polluting unrelated targets like legacy `.pro` globals.	course:linux-qt-core-widgets ku fact lesson:m01-l01
Complete the statement (fact: con_m01_l01_1, con_m01_l01_2, con_m01_l01_3): Declaring a private `Q_OBJECT` subclass directly inside `worker.cpp` r…	Declaring a private `Q_OBJECT` subclass directly inside `worker.cpp` requires `#include "worker.moc"` at the bottom of `worker.cpp` because `mocs_compilation.cpp` cannot see translation-unit-local types.	course:linux-qt-core-widgets ku fact lesson:m01-l01
Complete the statement (fact: con_m01_l01_1, con_m01_l01_2, con_m01_l01_3): Forward-declaring pointer members (`class QPushButton;`) in widget hea…	Forward-declaring pointer members (`class QPushButton;`) in widget headers instead of pulling the `<QtWidgets>` umbrella header isolates downstream translation units from massive preprocessor token fan-out.	course:linux-qt-core-widgets ku fact lesson:m01-l01
Complete the statement (fact: con_m01_l02_1, con_m01_l02_2, con_m01_l02_3): Destroying a parent `QObject` walks `QObjectPrivate::children` and cal…	Destroying a parent `QObject` walks `QObjectPrivate::children` and calls `delete` on remaining children, so parenting a stack-allocated child onto a shorter-lived stack parent causes a fatal invalid-free crash.	course:linux-qt-core-widgets ku fact lesson:m01-l02
Complete the statement (fact: con_m01_l02_1, con_m01_l02_2, con_m01_l02_3): `QObject` deletes its copy constructor and copy-assignment operator (`…	`QObject` deletes its copy constructor and copy-assignment operator (`Q_DISABLE_COPY_MOVE`) because tree identity, `this` parent links, and live signal connections cannot be meaningfully cloned.	course:linux-qt-core-widgets ku fact lesson:m01-l02
Complete the statement (fact: con_m01_l02_1, con_m01_l02_2, con_m01_l02_3): Deleting a heap-allocated child `QObject` before its parent executes `…	Deleting a heap-allocated child `QObject` before its parent executes `~QObject()`, which removes `this` from the parent's `children` list immediately so the parent never double-deletes it later.	course:linux-qt-core-widgets ku fact lesson:m01-l02
Complete the statement (fact: con_m01_l02_1, con_m01_l02_2, con_m01_l02_3): Production C++20 widgets follow the Rule of Zero by delegating POSIX d…	Production C++20 widgets follow the Rule of Zero by delegating POSIX descriptors to Rule-of-Five RAII guards (`std::exchange` move transfer) while storing `this`-parented child widgets as raw non-owning pointers.	course:linux-qt-core-widgets ku fact lesson:m01-l02
Complete the statement (fact: con_m01_l03_1, con_m01_l03_2, con_m01_l03_3): Declaring any `virtual` function adds one hidden `vptr` per instance p…	Declaring any `virtual` function adds one hidden `vptr` per instance pointing to a per-class `vtable`, whereas a C++20 `concept` constrains templates at compile time with zero indirect-branch overhead.	course:linux-qt-core-widgets ku fact lesson:m01-l03
Complete the statement (fact: con_m01_l03_1, con_m01_l03_2, con_m01_l03_3): Deleting a derived object through a base-class pointer whose destructo…	Deleting a derived object through a base-class pointer whose destructor is non-virtual invokes undefined behavior under ISO C++20; polymorphic interfaces must declare `virtual ~Interface() = default;`.	course:linux-qt-core-widgets ku fact lesson:m01-l03
Complete the statement (fact: con_m01_l03_1, con_m01_l03_2, con_m01_l03_3): Marking virtual overrides with `override` catches base-signature drift…	Marking virtual overrides with `override` catches base-signature drift at compile time, while marking leaf widgets `final` lets the optimizer devirtualize calls through leaf pointers.	course:linux-qt-core-widgets ku fact lesson:m01-l03
Complete the statement (fact: con_m01_l03_1, con_m01_l03_2, con_m01_l03_3): Value structs such as fixed-point `MilliVolts` cleanly overload `opera…	Value structs such as fixed-point `MilliVolts` cleanly overload `operator<=>` and `operator+`, whereas `Q_OBJECT` classes forbid copy/value operators and cannot be C++ class templates because `moc` emits concrete `QMetaObject` globals.	course:linux-qt-core-widgets ku fact lesson:m01-l03
Complete the statement (fact: con_m02_l01_1, con_m02_l01_2, con_m02_l01_3): Qt 6 splits `QtCore` (non-GUI event/meta/IPC), `QtGui` (windows, fonts…	Qt 6 splits `QtCore` (non-GUI event/meta/IPC), `QtGui` (windows, fonts, `QPainter`, RHI), and `QtWidgets` so headless daemons link `Qt6::Core` without pulling Wayland or X11 display dependencies.	course:linux-qt-core-widgets ku fact lesson:m02-l01
Complete the statement (fact: con_m02_l01_1, con_m02_l01_2, con_m02_l01_3): Public Qt classes keep `sizeof(PublicClass)` constant across minor lib…	Public Qt classes keep `sizeof(PublicClass)` constant across minor library upgrades by storing internal fields in a `*Private` heap struct accessed via `d_ptr` (`Q_DECLARE_PRIVATE`) with back-pointer `q_ptr` (`Q_DECLARE_PUBLIC`).	course:linux-qt-core-widgets ku fact lesson:m02-l01
Complete the statement (fact: con_m02_l01_1, con_m02_l01_2, con_m02_l01_3): `QString` (UTF-16LE `char16_t` units) and `QByteArray` (raw bytes) sha…	`QString` (UTF-16LE `char16_t` units) and `QByteArray` (raw bytes) share one atomically reference-counted `QArrayData` block across copies until a mutating call triggers `detach()` when `ref > 1`.	course:linux-qt-core-widgets ku fact lesson:m02-l01
Complete the statement (fact: con_m02_l01_1, con_m02_l01_2, con_m02_l01_3): Iterating a shared non-const `QString` or `QByteArray` with `for (auto…	Iterating a shared non-const `QString` or `QByteArray` with `for (auto ch : buf)` invokes non-const `begin()` and forces an unnecessary deep heap copy unless wrapped in `std::as_const(buf)` or read via `constData()`.	course:linux-qt-core-widgets ku fact lesson:m02-l01
Complete the statement (fact: con_m02_l02_1, con_m02_l02_2, con_m02_l02_3): During a `CMAKE_AUTOUIC` build, `uic` compiles `panel.ui` XML ahead-of…	During a `CMAKE_AUTOUIC` build, `uic` compiles `panel.ui` XML ahead-of-time into `ui_panel.h` containing `Ui_Panel::setupUi()` and `retranslateUi()`, shipping zero XML files or XML parsers to the target.	course:linux-qt-core-widgets ku fact lesson:m02-l02
Complete the statement (fact: con_m02_l02_1, con_m02_l02_2, con_m02_l02_3): Composing `std::unique_ptr<Ui::Panel> m_ui` as a `private` member enca…	Composing `std::unique_ptr<Ui::Panel> m_ui` as a `private` member encapsulates generated child widget pointers, whereas `public Ui::Panel` inheritance leaks internal controls to external callers.	course:linux-qt-core-widgets ku fact lesson:m02-l02
Complete the statement (fact: con_m02_l02_1, con_m02_l02_2, con_m02_l02_3): `QMetaObject::connectSlotsByName` matches `on_<objectName>_<signal>` s…	`QMetaObject::connectSlotsByName` matches `on_<objectName>_<signal>` slot names via runtime string lookup, so renaming a widget in Designer silently breaks button wiring with zero C++ compiler errors.	course:linux-qt-core-widgets ku fact lesson:m02-l02
Complete the statement (fact: con_m02_l02_1, con_m02_l02_2, con_m02_l02_3): Code-first C++ widget construction excels for parameterized multi-chan…	Code-first C++ widget construction excels for parameterized multi-channel industrial HMIs, producing compact Git diffs, loops over channel arrays, and compile-time verified PMF `QObject::connect` calls.	course:linux-qt-core-widgets ku fact lesson:m02-l02
Complete the statement (fact: con_m02_l03_1, con_m02_l03_2, con_m02_l03_3): In `<qtmetamacros.h>`, `emit` expands to nothing, `slots` expands to n…	In `<qtmetamacros.h>`, `emit` expands to nothing, `slots` expands to nothing, and `signals` expands to `public` so callers can pass `&Sender::signalName` into PMF `QObject::connect`.	course:linux-qt-core-widgets ku fact lesson:m02-l03
Complete the statement (fact: con_m02_l03_1, con_m02_l03_2, con_m02_l03_3): Emitting a `Q_OBJECT` signal invokes a `moc`-generated C++ member func…	Emitting a `Q_OBJECT` signal invokes a `moc`-generated C++ member function that packs operand addresses into `void *_a[]` (`_a[0]` return storage, `_a[1..N]` argument addresses) and calls `QMetaObject::activate`.	course:linux-qt-core-widgets ku fact lesson:m02-l03
Complete the statement (fact: con_m02_l03_1, con_m02_l03_2, con_m02_l03_3): `moc` packs class, signal, slot, and parameter names into one contiguo…	`moc` packs class, signal, slot, and parameter names into one contiguous `.rodata` `qt_meta_stringdata` offset/length table alongside `qt_meta_data` integer method descriptors, requiring zero startup heap allocations.	course:linux-qt-core-widgets ku fact lesson:m02-l03
Complete the statement (fact: con_m02_l03_1, con_m02_l03_2, con_m02_l03_3): `qt_metacall` delegates to `SuperClass::qt_metacall` first, subtractin…	`qt_metacall` delegates to `SuperClass::qt_metacall` first, subtracting each base class's method count from `_id` so `qt_static_metacall` switches on a zero-based local method index.	course:linux-qt-core-widgets ku fact lesson:m02-l03
Complete the statement (fact: con_m03_l01_1, con_m03_l01_2, con_m03_l01_3): Three-argument `QObject::connect(sender, &S::sig, lambda)` binds conne…	Three-argument `QObject::connect(sender, &S::sig, lambda)` binds connection lifetime solely to `sender`, causing a fatal use-after-free crash if `lambda` captures `[this]` on a shorter-lived receiver `QWidget`.	course:linux-qt-core-widgets ku fact lesson:m03-l01
Complete the statement (fact: con_m03_l01_1, con_m03_l01_2, con_m03_l01_3): Four-argument `QObject::connect(sender, &S::sig, receiver, lambda)` ti…	Four-argument `QObject::connect(sender, &S::sig, receiver, lambda)` ties the connection to both endpoints so `~QObject()` on `receiver` disconnects the closure automatically and `Qt::AutoConnection` queues onto `receiver`'s thread.	course:linux-qt-core-widgets ku fact lesson:m03-l01
Complete the statement (fact: con_m03_l01_1, con_m03_l01_2, con_m03_l01_3): Pointer-to-member `QObject::connect` verifies parameter conversions at…	Pointer-to-member `QObject::connect` verifies parameter conversions at compile time via `QtPrivate::FunctionPointer` traits and permits slots to accept a shorter prefix of the signal's arguments.	course:linux-qt-core-widgets ku fact lesson:m03-l01
Complete the statement (fact: con_m03_l01_1, con_m03_l01_2, con_m03_l01_3): Passing `Qt::UniqueConnection` bitwise-ORed into connection flags dedu…	Passing `Qt::UniqueConnection` bitwise-ORed into connection flags deduplicates identical `(sender, &S::sig, receiver, &R::slot)` PMF pairs, whereas anonymous C++ lambdas have distinct closure types and require explicit handle tracking.	course:linux-qt-core-widgets ku fact lesson:m03-l01
Complete the statement (fact: con_m03_l02_1, con_m03_l02_2, con_m03_l02_3): `QCoreApplication::sendEvent(dst, &ev)` dispatches a stack-allocated `…	`QCoreApplication::sendEvent(dst, &ev)` dispatches a stack-allocated `QEvent` synchronously on the current call stack without deleting `ev`, whereas `postEvent(dst, new Ev)` queues a heap event asynchronously and `delete`s it after delivery.	course:linux-qt-core-widgets ku fact lesson:m03-l02
Complete the statement (fact: con_m03_l02_1, con_m03_l02_2, con_m03_l02_3): Passing the address of a stack-allocated `QEvent` into `QCoreApplicati…	Passing the address of a stack-allocated `QEvent` into `QCoreApplication::postEvent` causes fatal heap corruption when the event dispatcher drains the queue and executes `delete event`.	course:linux-qt-core-widgets ku fact lesson:m03-l02
Complete the statement (fact: con_m03_l02_1, con_m03_l02_2, con_m03_l02_3): Pre-target watchers installed via `target->installEventFilter(filterOb…	Pre-target watchers installed via `target->installEventFilter(filterObj)` execute in LIFO order (last installed runs first); returning `true` consumes the event immediately while returning `false` forwards it toward `target->event()`.	course:linux-qt-core-widgets ku fact lesson:m03-l02
Complete the statement (fact: con_m03_l02_1, con_m03_l02_2, con_m03_l02_3): Qt compresses queued `QEvent::UpdateRequest` events posted by `QWidget…	Qt compresses queued `QEvent::UpdateRequest` events posted by `QWidget::update()` so bursts of state changes within one event-loop turn coalesce into a single `QPaintEvent` raster pass.	course:linux-qt-core-widgets ku fact lesson:m03-l02
Complete the statement (fact: con_m03_l03_1, con_m03_l03_2, con_m03_l03_3): `QTimer` and `QElapsedTimer` schedule deadlines on `CLOCK_MONOTONIC`, …	`QTimer` and `QElapsedTimer` schedule deadlines on `CLOCK_MONOTONIC`, advancing periodic targets phase-locked (`next_ns += period_ns`) so NTP or operator wall-clock jumps never freeze or burst HMI timers.	course:linux-qt-core-widgets ku fact lesson:m03-l03
Complete the statement (fact: con_m03_l03_1, con_m03_l03_2, con_m03_l03_3): `QTimer` defaults to `Qt::CoarseTimer`, which rounds wakeups within a …	`QTimer` defaults to `Qt::CoarseTimer`, which rounds wakeups within a `5%` interval window to batch OS wakeups; deterministic control/telemetry cadences require `setTimerType(Qt::PreciseTimer)`.	course:linux-qt-core-widgets ku fact lesson:m03-l03
Complete the statement (fact: con_m03_l03_1, con_m03_l03_2, con_m03_l03_3): Context-bound `QTimer::singleShot(ms, receiver, slot)` cancels pending…	Context-bound `QTimer::singleShot(ms, receiver, slot)` cancels pending one-shot callbacks automatically if `receiver` is destroyed before the deadline expires.	course:linux-qt-core-widgets ku fact lesson:m03-l03
Complete the statement (fact: con_m03_l03_1, con_m03_l03_2, con_m03_l03_3): Because `QTimer` and `QPaintEvent` (`WM_PAINT` / `UpdateRequest`) shar…	Because `QTimer` and `QPaintEvent` (`WM_PAINT` / `UpdateRequest`) share the cooperative GUI event loop, blocking a GUI-thread slot for `90 ms` delays every GUI `QTimer` and freezes frame rendering for `90 ms`.	course:linux-qt-core-widgets ku fact lesson:m03-l03
Complete the statement (fact: con_m04_l01_1, con_m04_l01_2, con_m04_l01_3): Disabling `autoRepeat` on safety-critical `QPushButton` and `QToolButt…	Disabling `autoRepeat` on safety-critical `QPushButton` and `QToolButton` actuators prevents a held finger or key bounce from synthesizing repeated `clicked()` pulses while enforcing at least `44x44 px` capacitive touch targets.	course:linux-qt-core-widgets ku fact lesson:m04-l01
Complete the statement (fact: con_m04_l01_1, con_m04_l01_2, con_m04_l01_3): `QButtonGroup` is a non-visual `QObject` container that enforces `QRad…	`QButtonGroup` is a non-visual `QObject` container that enforces `QRadioButton` or checkable button mutual exclusion and integer ID dispatch (`idClicked`) across arbitrary layouts without forcing buttons into one visual `QGroupBox`.	course:linux-qt-core-widgets ku fact lesson:m04-l01
Complete the statement (fact: con_m04_l01_1, con_m04_l01_2, con_m04_l01_3): `QAbstractButton::toggled(bool)` emits on both operator clicks and pro…	`QAbstractButton::toggled(bool)` emits on both operator clicks and programmatic `setChecked()` calls, whereas `clicked(bool)` emits only on interactive user activation (`mouse`, `touch`, `Space`, or `click()`).	course:linux-qt-core-widgets ku fact lesson:m04-l01
Complete the statement (fact: con_m04_l01_1, con_m04_l01_2, con_m04_l01_3): A tristate `QCheckBox` (`Qt::Unchecked`, `Qt::PartiallyChecked`, `Qt::…	A tristate `QCheckBox` (`Qt::Unchecked`, `Qt::PartiallyChecked`, `Qt::Checked`) summarizes mixed child enablement states, while `QDialogButtonBox` orders `AcceptRole`, `RejectRole`, and `DestructiveRole` buttons per platform style.	course:linux-qt-core-widgets ku fact lesson:m04-l01
Complete the statement (fact: con_m04_l02_1, con_m04_l02_2, con_m04_l02_3): `QValidator` classifies input strings into `Invalid` (rejected immedia…	`QValidator` classifies input strings into `Invalid` (rejected immediately), `Intermediate` (permitted while typing toward a valid value while suppressing `editingFinished()`), and `Acceptable` (eligible to commit).	course:linux-qt-core-widgets ku fact lesson:m04-l02
Complete the statement (fact: con_m04_l02_1, con_m04_l02_2, con_m04_l02_3): Stack-scoped `QSignalBlocker` suppresses intermediate signal emissions…	Stack-scoped `QSignalBlocker` suppresses intermediate signal emissions during programmatic peer-widget updates and restores the widget's prior `signalsBlocked()` boolean on scope exit.	course:linux-qt-core-widgets ku fact lesson:m04-l02
Complete the statement (fact: con_m04_l02_1, con_m04_l02_2, con_m04_l02_3): `QPlainTextEdit` with `setMaximumBlockCount()` stores line-oriented lo…	`QPlainTextEdit` with `setMaximumBlockCount()` stores line-oriented logs in bounded plain-text blocks (`O(1)` eviction), whereas `QTextEdit` and `QTextBrowser` maintain a full rich-text `QTextDocument` layout tree.	course:linux-qt-core-widgets ku fact lesson:m04-l02
Complete the statement (fact: con_m04_l02_1, con_m04_l02_2, con_m04_l02_3): Attaching typed `QVariant` user data to `QComboBox::addItem()`, settin…	Attaching typed `QVariant` user data to `QComboBox::addItem()`, setting `QSpinBox::setKeyboardTracking(false)`, and pinning `QDateTimeEdit` to `QTimeZone::UTC` prevent locale drift and half-typed setpoint spikes.	course:linux-qt-core-widgets ku fact lesson:m04-l02
Complete the statement (fact: con_m04_l03_1, con_m04_l03_2, con_m04_l03_3): `QLayoutEngine` subtracts margins and `(N_visible - 1) * spacing` firs…	`QLayoutEngine` subtracts margins and `(N_visible - 1) * spacing` first, locks `QSizePolicy::Fixed` items to `sizeHint()`, clamps `[minimumSize, maximumSize]`, and divides surplus across stretch factors without cumulative rounding drift.	course:linux-qt-core-widgets ku fact lesson:m04-l03
Complete the statement (fact: con_m04_l03_1, con_m04_l03_2, con_m04_l03_3): Hidden widgets (`!isVisible()`) consume zero pixels and zero inter-ite…	Hidden widgets (`!isVisible()`) consume zero pixels and zero inter-item `spacing` gaps, while `QSpacerItem` (`addStretch`) absorbs slack space without allocating a `QWidget` window backing surface.	course:linux-qt-core-widgets ku fact lesson:m04-l03
Complete the statement (fact: con_m04_l03_1, con_m04_l03_2, con_m04_l03_3): `QGridLayout` solves shared column and row tracks (`setColumnStretch`,…	`QGridLayout` solves shared column and row tracks (`setColumnStretch`, `setRowStretch`) across multi-row telemetry cells, whereas `QFormLayout` pairs two-column label-and-field calibration rows cleanly.	course:linux-qt-core-widgets ku fact lesson:m04-l03
Complete the statement (fact: con_m04_l03_1, con_m04_l03_2, con_m04_l03_3): Passing a `QWidget *` constructor argument to a nested sub-layout (`ne…	Passing a `QWidget *` constructor argument to a nested sub-layout (`new QHBoxLayout(this)`) fails because a `QWidget` owns only one root layout; nested layouts construct parentless and attach via `addLayout()`.	course:linux-qt-core-widgets ku fact lesson:m04-l03
Complete the statement (fact: con_m05_l01_1, con_m05_l01_2, con_m05_l01_3): Registering C++20 page factories in `QStackedWidget` and materializing…	Registering C++20 page factories in `QStackedWidget` and materializing off-screen diagnostics pages on first visit keeps cold-boot RAM and startup latency within embedded budgets.	course:linux-qt-core-widgets ku fact lesson:m05-l01
Complete the statement (fact: con_m05_l01_1, con_m05_l01_2, con_m05_l01_3): `QScrollArea` defaults to `widgetResizable() == false` (freezing inner…	`QScrollArea` defaults to `widgetResizable() == false` (freezing inner layouts at initial size unless set `true`), and `QStackedWidget::removeWidget(stub)` requires explicit `delete stub` to free RAM.	course:linux-qt-core-widgets ku fact lesson:m05-l01
Complete the statement (fact: con_m05_l01_1, con_m05_l01_2, con_m05_l01_3): Setting `QLabel::setTextFormat(Qt::PlainText)` on live bus strings pre…	Setting `QLabel::setTextFormat(Qt::PlainText)` on live bus strings prevents `Qt::AutoText` from misinterpreting `<` brackets in telemetry payloads as rich-text HTML tags.	course:linux-qt-core-widgets ku fact lesson:m05-l01
Complete the statement (fact: con_m05_l01_1, con_m05_l01_2, con_m05_l01_3): `QDockWidget` and `QMdiArea` organize multi-pane engineering workbench…	`QDockWidget` and `QMdiArea` organize multi-pane engineering workbenches (`saveState`/`restoreState`), whereas `QGraphicsView` indexes thousands of zoomable 2D `QGraphicsItem` schematics via BSP trees.	course:linux-qt-core-widgets ku fact lesson:m05-l01
Complete the statement (fact: con_m05_l02_1, con_m05_l02_2, con_m05_l02_3): Convenience widgets (`QTableWidget`, `QListWidget`, `QTreeWidget`) all…	Convenience widgets (`QTableWidget`, `QListWidget`, `QTreeWidget`) allocate `O(R * C)` heap item objects and duplicate `QVariant` strings, whereas `QTableView`, `QListView`, and `QTreeView` query `data()` only for visible viewport cells.	course:linux-qt-core-widgets ku fact lesson:m05-l02
Complete the statement (fact: con_m05_l02_1, con_m05_l02_2, con_m05_l02_3): `QModelIndex` is a transient stack coordinate (`row`, `column`, `inter…	`QModelIndex` is a transient stack coordinate (`row`, `column`, `internalPointer`, `model *`) that must never be cached across model insertions, removals, or resets.	course:linux-qt-core-widgets ku fact lesson:m05-l02
Complete the statement (fact: con_m05_l02_1, con_m05_l02_2, con_m05_l02_3): `QAbstractItemModel::data(index, role)` projects multiple facets from …	`QAbstractItemModel::data(index, role)` projects multiple facets from one C++ struct (`Qt::DisplayRole` text, `Qt::ForegroundRole` color, `Qt::UserRole + k` raw typed integers) and must return empty `QVariant{}` for unhandled roles.	course:linux-qt-core-widgets ku fact lesson:m05-l02
Complete the statement (fact: con_m05_l02_1, con_m05_l02_2, con_m05_l02_3): A flat `QAbstractTableModel` or `QAbstractListModel` must return `0` f…	A flat `QAbstractTableModel` or `QAbstractListModel` must return `0` from `rowCount(parent)` whenever `parent.isValid()` is `true`, whereas `QTreeView` models encode parent-child pointers via `createIndex(row, col, ptr)`.	course:linux-qt-core-widgets ku fact lesson:m05-l02
Complete the statement (fact: con_m05_l03_1, con_m05_l03_2, con_m05_l03_3): `beginInsertRows(parent, first, last)` and `beginRemoveRows(parent, fi…	`beginInsertRows(parent, first, last)` and `beginRemoveRows(parent, first, last)` take inclusive `[first, last]` indices BEFORE mutating the backing vector, updating `QPersistentModelIndex` selections without resetting scroll state.	course:linux-qt-core-widgets ku fact lesson:m05-l03
Complete the statement (fact: con_m05_l03_1, con_m05_l03_2, con_m05_l03_3): A view bound to `QSortFilterProxyModel` emits proxy `QModelIndex` coor…	A view bound to `QSortFilterProxyModel` emits proxy `QModelIndex` coordinates that must be translated via `proxy->mapToSource(proxyIdx)` before indexing the source `QAbstractItemModel`.	course:linux-qt-core-widgets ku fact lesson:m05-l03
Complete the statement (fact: con_m05_l03_1, con_m05_l03_2, con_m05_l03_3): `QUndoStack` and `QUndoCommand` (`undo()` / `redo()`, inspectable via …	`QUndoStack` and `QUndoCommand` (`undo()` / `redo()`, inspectable via `QUndoView`) encapsulate reversible operator table and parameter edits cleanly.	course:linux-qt-core-widgets ku fact lesson:m05-l03
Complete the statement (fact: con_m05_l03_1, con_m05_l03_2, con_m05_l03_3): One flyweight `QStyledItemDelegate::paint` instance (`painter->save()`…	One flyweight `QStyledItemDelegate::paint` instance (`painter->save()` / `restore()`) custom-renders visible severity badges with zero extra `QWidget` allocations, unlike `QAbstractItemView::setIndexWidget()`.	course:linux-qt-core-widgets ku fact lesson:m05-l03
Complete the statement (fact: con_m06_l01_1, con_m06_l01_2, con_m06_l01_3): Opening an existing configuration file with `QFile` and `QIODevice::Wr…	Opening an existing configuration file with `QFile` and `QIODevice::WriteOnly | QIODevice::Truncate` zeroes the live inode immediately (`O_TRUNC`), leaving a `0`-byte or partial file if power fails mid-write.	course:linux-qt-core-widgets ku fact lesson:m06-l01
Complete the statement (fact: con_m06_l01_1, con_m06_l01_2, con_m06_l01_3): `QSaveFile` writes to a sibling temporary file in the destination dire…	`QSaveFile` writes to a sibling temporary file in the destination directory, flushes storage via `fsync()`, and atomically replaces the target via POSIX `rename()` inside `commit()`.	course:linux-qt-core-widgets ku fact lesson:m06-l01
Complete the statement (fact: con_m06_l01_1, con_m06_l01_2, con_m06_l01_3): If `QSaveFile` leaves scope without calling `commit()` (or after `canc…	If `QSaveFile` leaves scope without calling `commit()` (or after `cancelWriting()`), `~QSaveFile()` closes and `unlink()`s the temporary file while leaving the previous configuration file untouched.	course:linux-qt-core-widgets ku fact lesson:m06-l01
Complete the statement (fact: con_m06_l01_1, con_m06_l01_2, con_m06_l01_3): Qt 6 `QTextStream` defaults to `QStringConverter::Utf8` (requiring exp…	Qt 6 `QTextStream` defaults to `QStringConverter::Utf8` (requiring explicit `status() == QTextStream::Ok` checks), while `QJsonDocument::fromJson` pinpoints syntax faults via `QJsonParseError`.	course:linux-qt-core-widgets ku fact lesson:m06-l01
Complete the statement (fact: con_m06_l02_1, con_m06_l02_2, con_m06_l02_3): All `QWidget` drawing must execute inside `paintEvent(QPaintEvent *)` …	All `QWidget` drawing must execute inside `paintEvent(QPaintEvent *)` (scheduled asynchronously via `update()`), honoring `event->region()` dirty clip bounds on the window backing store.	course:linux-qt-core-widgets ku fact lesson:m06-l02
Complete the statement (fact: con_m06_l02_1, con_m06_l02_2, con_m06_l02_3): `QImage::Format_ARGB32_Premultiplied` pre-scales RGB channels by `alph…	`QImage::Format_ARGB32_Premultiplied` pre-scales RGB channels by `alpha / 255`, letting `QPainter` Porter-Duff `SourceOver` blend `out = src + dst * (255 - a) / 255` without per-pixel division.	course:linux-qt-core-widgets ku fact lesson:m06-l02
Complete the statement (fact: con_m06_l02_1, con_m06_l02_2, con_m06_l02_3): Caching static gauge bezels and tick marks into a `Format_ARGB32_Premu…	Caching static gauge bezels and tick marks into a `Format_ARGB32_Premultiplied` `QImage` on `resizeEvent` avoids repeating trigonometric tick strokes on every 60 Hz needle update.	course:linux-qt-core-widgets ku fact lesson:m06-l02
Complete the statement (fact: con_m06_l02_1, con_m06_l02_2, con_m06_l02_3): In `QtCharts`, calling `QLineSeries::append(x, y)` at `1 kHz` triggers…	In `QtCharts`, calling `QLineSeries::append(x, y)` at `1 kHz` triggers `1,000` per-point signal/layout passes per second, whereas buffering samples and calling `series->replace(points)` at `30 Hz` emits once per frame.	course:linux-qt-core-widgets ku fact lesson:m06-l02
Complete the statement (fact: con_m06_l03_1, con_m06_l03_2, con_m06_l03_3): Setting `QT_QPA_PLATFORM=offscreen` runs full `QtWidgets` layouts, inp…	Setting `QT_QPA_PLATFORM=offscreen` runs full `QtWidgets` layouts, input dispatch, and `QPainter` `grab()` rasterization in headless Linux CI containers without X11 or Wayland.	course:linux-qt-core-widgets ku fact lesson:m06-l03
Complete the statement (fact: con_m06_l03_1, con_m06_l03_2, con_m06_l03_3): `QTest::mouseClick` and `QTest::keyClicks` synthesize realistic user e…	`QTest::mouseClick` and `QTest::keyClicks` synthesize realistic user events through `QWidget` event filters and button interlocks, paired with `_data()` / `QFETCH` boundary matrices.	course:linux-qt-core-widgets ku fact lesson:m06-l03
Complete the statement (fact: con_m06_l03_1, con_m06_l03_2, con_m06_l03_3): `QSignalSpy` records emitted signal argument lists (`spy.count()`, `sp…	`QSignalSpy` records emitted signal argument lists (`spy.count()`, `spy.at(i)`), while `spy.wait()` and `QTRY_COMPARE` pump the thread event loop instead of deadlocking timers with `sleep`.	course:linux-qt-core-widgets ku fact lesson:m06-l03
Complete the statement (fact: con_m06_l03_1, con_m06_l03_2, con_m06_l03_3): Passing `-o -,tap` to a compiled `QTest` binary formats stdout as stan…	Passing `-o -,tap` to a compiled `QTest` binary formats stdout as standard `TAP version 13` (`ok` / `not ok` + YAML diagnostics) for CI pipelines.	course:linux-qt-core-widgets ku fact lesson:m06-l03
