Skip to end of metadata
Go to start of metadata

LieberLieber Embedded Engineer supports Qt Core features such as  QObject, QEnum, QSlot and QSignal by extending the class, function and/or attribute with a Q[name] Stereotype.

Version 2.1

This feature is available in Version 2.1


Example implemetation taken from the new Components Test Model:

QObject

By adding the qobject stereotype to a class, the code generation (for C++) will generate the following.

  • a header to include QObject
  • an inheritance of the QObject base class
  • adds the Q_OBJECT macro to the class


QEnum

By adding the qenum stereotype to a class, the code generation (for C++) will generate the following.

  • an enumeration to use with another class
  • when used inside another class, an attribute with the Q_ENUM macro

QSlot & QSignal

qslot and qsingal stereotypes can be assigned to operations and will create Qt slots and signals.

In Qt signals and slots are used for communication between objects and are an alternative to callback techniques.

 A signal is emitted when a particular event occurs.  A slot is a function that is called in response to a particular signal

See also

https://wiki.qt.io/How_to_Use_Signals_and_Slots



  • No labels