Module not installed
-
@SQEW said in QML module not installed:
QQmlEngine::addImportPath("/lemonade/bin/org/lemonade/element") as well as a few other things, but I can't get it to work.
should be
QQmlEngine::addImportPath("/lemonade/bin/");
-
@SQEW said in QML module not installed:
QQmlEngine::addImportPath("/lemonade/bin/org/lemonade/element") as well as a few other things, but I can't get it to work.
should be
QQmlEngine::addImportPath("/lemonade/bin/");
Told you it was a simple fix! In fact, I tried this path before, but it still didn't work at first, because I used 'import Element 1.0' in my QML files. I've replaced that with 'import org.lemonade.element 1.0', and it works now, thanks!
Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?
-
Told you it was a simple fix! In fact, I tried this path before, but it still didn't work at first, because I used 'import Element 1.0' in my QML files. I've replaced that with 'import org.lemonade.element 1.0', and it works now, thanks!
Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?
@SQEW said in QML module not installed:
Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?
no i don't know - but this doesn't mean there is a way. I also stumbled upon this, and i ended up copying my module to
QT_INSTALL_DIR/qml
folder.QtCreator probably has a setting somewhere to also set it's QML import path.
-
Told you it was a simple fix! In fact, I tried this path before, but it still didn't work at first, because I used 'import Element 1.0' in my QML files. I've replaced that with 'import org.lemonade.element 1.0', and it works now, thanks!
Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?
Hello @SQEW,
I had the same problem on linux and I first used the solution @raven-worx proposed, then I ended up creating a script which
export QML_IMPORT_PATH=/path/to/your/qml/
export QML2_IMPORT_PATH=/path/to/your/qml/before launching qtcreator