Skip to content
Rafał Malinowski edited this page Oct 25, 2016 · 3 revisions

Description

INJEQT_DONE is a tag added to slot method that is called before injector destructs itself and all of created objects.

Syntax

private slots:
    INJEQT_DONE void name();

Method tagged with INJEQT_DONE must be declared as slot (usually private), because such a method must be available in QMetaObject and it is not possible to tag a methods that is already tagged with Q_INVOKABLE.

Call order

All INJEQT_DONE methods of an object (defined it its type or in its ancestors) are called before injector with all of its objects is destroyed.

INJEQT_DONE methods are called for objects:

INJEQT_DONE methods are not called for objects:

Example

private slots:
    INJEQT_DONE void disconnectFromDependencies();