Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 5.11+: import of a qrc:/directory not working with QtQuickCompiler
Forum Updated to NodeBB v4.3 + New Features

Qt 5.11+: import of a qrc:/directory not working with QtQuickCompiler

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 452 Views 1 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
    Mosa
    wrote on last edited by Mosa
    #1

    Hi folks,

    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:

    import "qrc:/other"
    

    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?

    Thanks!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mosa
        wrote on last edited by
        #3

        Yes, the application works normally.

        1 Reply Last reply
        0

        • Login

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