Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 3.0.0-rc1
-
None
-
linux 32bit [android package]
Description
steps:
1- create a qml project using QQmlApplicationEngine.
2- create simple qml plugin. dir tree:
-qmlcomponentMyComponent-[qmldir,CustomControl.qml]
3- add import path in main.cpp
qmlappengine.addImportPath("qmlcomponent/")
4- use this component in main.qml
import MyComponent 1.0 as MC
MC.CustomControl{}
it works when running application but qtcreator can't recognize import path and autocomplete not working there. also red underline in import statement with this hint: qml module not found ....
when searched on the web it says that you can set QML2_IMPORT_PATH environment variable for fixing this issue. but setting this variable on
qmake .pro file can't solve the problem and also setting this in build environment.
and it must be set in operating system's environment variables.
and it is not good idea for changing operating system's variables for project's local components.