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. qmlscene - resources
Forum Updated to NodeBB v4.3 + New Features

qmlscene - resources

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 331 Views
  • 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.
  • P Offline
    P Offline
    poucz
    wrote on last edited by
    #1

    Hello,
    I write application in QML and I load all qml file by qrc (I using qtquickcompiler too, target machine is embeded linux).
    Now I discover prototyping GUI with qmlscene, It helps a lot.
    But qmlscene need file path - no qrc path to source.
    So I always need do this:

    
    //import "qrc:/javascript/javaFunction.js" as MyFnc
    import "../javascript/javaFunction.js" as MyFnc
    
    

    and same with icons, and another things.

    My result code not seems clear, I offen forgot switch to qrc, I have lots of coment in code....

    Thank you

    So my question is, if exist some technic how to solve this. Some macro, or If i can say qmlscene to replace qrc by "../", or something else ....

    1 Reply Last reply
    0
    • VStevenPV Offline
      VStevenPV Offline
      VStevenP
      wrote on last edited by
      #2

      See https://doc.qt.io/qt-5/qtqml-syntax-imports.html for some ideas.

      I don't think you need to use qrc:/ syntax to dereference the Javascript files during import. It isn't mentioned on that page, and they dereference the Javascript files directly in the example code.

      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