Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator seems to ignore QRC (M300 Unknown Component)
Qt 6.11 is out! See what's new in the release blog

Qt Creator seems to ignore QRC (M300 Unknown Component)

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcallegari79
    wrote on last edited by mcallegari79
    #1

    Hi everyone.
    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 ?

    Thanks !

    1 Reply Last reply
    2

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved