Meta-object System

Uses your system voice; voice and rate in settings.

Snapshot

≈ 1 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Meta Object System is a part of Qt framework core provided to support Qt extensions to C++ like signals/slots for inter-object communication, run-time type information, and the dynamic property system.

Meta Object System is a part of Qt framework core provided to support Qt extensions to C++ like signals/slots for inter-object communication, run-time type information, and the dynamic property system.

Architecture

The Meta object system consists of 3 things: QObject class, Q_OBJECT macro and a tool called moc (Meta-Object Compiler). QObject is the base class for all Qt classes, Q_OBJECT macro is used to enable meta-object features in classes and finally moc is a preprocessor that changes Q_OBJECT macro instances to C++ source code to enable meta object system mechanism in the class in which it is used. Using the meta object system has brought some criticism. In Qt documentation, several reasons have been given for the use of the meta object system, including benefits of code generation, dynamism of GUIs, automatic binding to scripting languages, not adding limitations and also reasonable performance in signal/slot implementation with moc. There are some efforts to make Qt needless of a preprocessor. These efforts include re-implementing Qt moc using libclang.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1356643529 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001356643529 · captured 1780007297.0 · version history

Cite this page as: encyclopegia.org, “Meta-object System”, snapshot enwiki-001356643529. https://encyclopegia.org/a/meta-object-system

Sources cited in this revision

Extracted from the cited revision's reference blocks; absent citations are not invented.