Important: Please read the Qt Code of Conduct -

qmlscene - resources

  • 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 ....

  • See 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.

Log in to reply