Macro qmetaobject::qt_base_class[][src]

macro_rules! qt_base_class {
    ($($t:tt)*) => { ... };
}

This macro must be used once as a type in a struct that derives from QObject. It is anotate from which QObject like trait it is supposed to derive. the field which it annotate will be an internal property holding a pointer to the actual C++ object

The trait needs to be like the QObject trait, see the documentation of the QObject trait.

#[derive(QObject)]
struct Foo {
   base : qt_base_class!(trait QObject),
}

Note: in the future, the plan is to extent so you could derive from other struct by doing base : qt_base_class(struct Foo). But this is not yet implemented