Skip to content
Rafał Malinowski edited this page Oct 24, 2016 · 4 revisions

Description

INJEQT_INIT is a tag added to slot method that is called after all dependencies has been set.

Syntax

private slots:
    INJEQT_INIT void name();

Method tagged with INJEQT_INIT 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_INIT methods of an object (defined it its type or in its ancestors) are called after all of the INJEQT_SET methods. Order of calling INJEQT_INIT methods in unspecified.

INJEQT_INIT methods are called for objects:

INJEQT_INIT methods are not called for objects:

Example

private slots:
    INJEQT_INIT void connectToDependencies();