Important: Please read the Qt Code of Conduct -

[SOLVED] - Error loading qml from c++ - module "QtQuick.Controls" is not installed

  • Hi, I have a qml file which imports QtQuick.Controls and works fine when run in Qt creator. But when i am trying to embed this using a c++ plugin (similar to the Loader qml element), I get the error:

    module "QtQuick.Controls" is not installed

    This is how i am loading the component:

    m_engine = new QQmlEngine(this);
    m_component = new QQmlComponent(m_engine, this);

    where m_source is the qml file which needs to be loaded.
    Does anyone know what the problem is. QtQuick.Controls works fine otherwise.

  • Fixed the build path to get rid of this error. The new loader c++ component needed access to quick controls.

Log in to reply