Qt Creator seems to ignore QRC (M300 Unknown Component)
I am using the latest Qt Creator 3.4.0 and I couldn't really figure out why it keeps on giving me M300 on my QML components.
I have a file structure like this:
project.qrc qml/common1.qml qml/common2.qml qml/folder1/A1.qml qml/folder1/A2.qml qml/folder2/B1.qml qml/folder2/B2.qml
My QRC file looks like this:
<RCC> <qresource prefix="/"> <file alias="common1.qml">qml/common1.qml</file> <file alias="common2.qml">qml/common2.qml</file> <file alias="A1.qml">qml/folder1/A1.qml</file> <file alias="A2.qml">qml/folder1/A2.qml</file> <file alias="B1.qml">qml/folder2/B1.qml</file> <file alias="B2.qml">qml/folder2/B2.qml</file> </qresource> </RCC>
When I build the project everything works fine. I used prefix="/" for simplicity, so I can refer to resources simply with "qrc:/xxx.qml"
However, in Qt Creator, if in A1.qml I use the "common1" component it underlines it in red and says "Unknown Component (M300)"
This is pretty annoying because I completely loose the autocompletion feature, so I always need to remember which properties I defined on each component (and keep a million of files open to look them up every time)
Is this a bug or is there a way to workaround it and make Creator happy ?