Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt 5.11+: import of a qrc:/directory not working with QtQuickCompiler
Mosa last edited by Mosa
when I use CONFIG += qtquickcompiler in my .pro-file the import statement doesn't work respectively auto-completation fails.
My working tree looks like this:
/other -/qml --A.qml --qmldir /project -/myProject --.pro --/qml ---main.qml ---qmldir
I want to use now A.qml in main.qml with this import statement:
My qrc-file looks like this
<!DOCTYPE RCC> <RCC version="1.0"> <qresource prefix="/"> <file alias="qml/main.qml">main.qml</file> <file alias="other/A.qml">../../other/qml/A.qml</file> </qresource> </RCC>
If I use CONFIG += qtquickcompiler I get an "Unknown component" M300 failure but the application is working. Without CONFIG += qtquickcompiler everything is alright and auto-completion works.
Do you have any idea how to solve this issue?
So that m300 error is shown only in Qt Creator, but application works normally, right? Then you should report this as a bug in Qt Creator.
Mosa last edited by
Yes, the application works normally.