Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Installation and Deployment
    2
    4
    653
    Loading More Posts
    • 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.
    • Aras
      Aras last edited by

      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!

      JKSH 1 Reply Last reply Reply Quote 1
      • JKSH
        JKSH Moderators @Aras last edited by

        @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?

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply Reply Quote 5
        • Aras
          Aras last edited by

          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!

          JKSH 1 Reply Last reply Reply Quote 1
          • JKSH
            JKSH Moderators @Aras last edited by

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

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply Reply Quote 4
            • First post
              Last post