Can I develop a Qt Quick app without using the qt resource system (qrc)?



  • Is it possible to develop a Qt Quick application that does not embed any resourced? I am wondering if it is possible to deploy all assets and resources separately to target device and reference them relative to home directory. If I understand correctly when using .qrc file to reference resources, all of those resources get bundled inside the executable. I am thinking in my situation there are some important advantages to keeping all resources separate from the binary.

    So my question is whether it is possible to not use .qrc and if so, is it possible to configure qmake to copy qml files to build folder so my app would run? Let me know if you think this is a bad idea, but I appreciate if you explain a bit :)

    Thanks!


  • Moderators

    @Aras said in Can I develop a Qt Quick app without using the qt resource system (qrc)?:

    Is it possible to develop a Qt Quick application that does not embed any resourced? I am wondering if it is possible to deploy all assets and resources separately to target device and reference them relative to home directory.... So my question is whether it is possible to not use .qrc

    Yes, it is possible. In fact, this is how QML apps were originally deployed. Individual .qml files were provided along the executable file.

    If I understand correctly when using .qrc file to reference resources, all of those resources get bundled inside the executable.

    That's correct.

    is it possible to configure qmake to copy qml files to build folder so my app would run?

    It should be possible, but I don't know the details at the moment. For now, you can manually copy them over.

    Let me know if you think this is a bad idea, but I appreciate if you explain a bit :)

    As long as you understand that exposing individual .qml files makes it very easy for the end user to modify your program's code.

    I am thinking in my situation there are some important advantages to keeping all resources separate from the binary

    I'm curious: What do you plan to do?



  • What do you plan to do?

    I don't have a concrete plan at the moment but since in my case I would have access to the device and can push updates, I was thinking by separating resources I would updates the graphics in future, or update certain parts of the UI seasonally. I also think keeping the resources out makes the binary smaller and the build process more flexible.

    I tried putting my graphics out and just the qml files in the qrc but that does not seem to work.

    Thank for your quick response and help!


  • Moderators

    @Aras said in Can I develop a Qt Quick app without using the qt resource system (qrc)?:

    I tried putting my graphics out and just the qml files in the qrc but that does not seem to work.

    I think this should work.

    I suggest you post your code in a new thread; someone should be able to show you how to do it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.