1

Auto completion doesn't work in Qt creator with QtQuick module and qmldir which includes qml component from qrc

After defining my QML module which includes a c++ plugin and generating the .qmltypes file for it, Qt creator was able to recognize the plugin components for auto completion but it wasn't able to auto complete my qml components which are in qrc :

module MyModule

plugin myModulePlugin
typeinfo myModulePlugin.qmltypes

# For MyComponent1, Qt creator is able to auto complete when I start to type
# the name of the component and the name is colored due to the recognition .
# Auto completion for component properties work too

MyComponent1 1.0 MyComponent1.qml

# For MyComponent2, Qt creator is unable to auto complete and the name
# is not colored .Auto completion for component properties don't work either

MyComponent2 1.0 qrc:///MyModule/qml/MyComponent2.qml

To clarify, the module and its content are copied to a seperated folder which is included in QML_IMPORT_PATH and QML2_IMPORT_PATH before launching Qt creator.

Is there any possible way to make the Qt creator acknowledge the components inside the qrc ?

Edit: Both MyComponent1 and MyComponent2 work. The only problem is in the Qt creator auto completion for the 2nd one

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.