Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] - Error loading qml from c++ - module "QtQuick.Controls" is not installed
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harchu
    wrote on last edited by
    #1

    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_engine->setImportPathList(QStringList());
    m_component = new QQmlComponent(m_engine, this);
    m_component->loadUrl(m_source);

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

    1 Reply Last reply
    0
    • H Offline
      H Offline
      harchu
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved