Important: Please read the Qt Code of Conduct -

QML module not found in Designer using QML_ELEMENT

  • Hello,

    I integrated C++ class into QML using QML_ELEMENT. While it compiles and works find, in Qt Designer, in QML file the import line with module name is highlighted and error appears: QML module not found (Backend).

    In .pro file I have the following:

    CONFIG += qmltypes
    QML_IMPORT_NAME = Backend

    In apimanager.h file I have the following:

    class ApiManager : public QObject
        const QString apiUrl = "";
        explicit ApiManager(QObject *parent = nullptr);
        Q_INVOKABLE void login(QString username, QString password);

    I'm running Qt 5.15.1 on MacOS. While having the same version on my Laptop does not show this error, on my Desktop PC it does. I have tried to fully reinstall Qt (manually deleted all config and cache folders).

Log in to reply