Qt Forum

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

    [SOLVED]Working With Files in Mobile Apps

    Mobile and Embedded
    2
    3
    679
    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.
    • W
      wwolff last edited by

      Hi!

      I have a simple question , but it´s being hard for me understand where Qt and how i can setup my App to work with
      files, for example:

      I have a specific folder in my aplication called "world" , and Inside of this folder i have all the shaders, textures , scripts and etc...used by my aplication.

      This works fine for PC , Mac and Linux, but i dont know yet how i can setup this to be loaded properly by my aplication, for example:

      I use this line of code to load a shader in my aplication:

      @pINS3DPlatInterface->AddShader("../../INS/world/Shaders/vs/ins3dMobvs.glsl",ISH_VERTEX_SHADER_TYPE);@

      But when i run it in Android the application not find it...

      How can i setup a folder containing files to be load at runtime in android?

      Kind Regards.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You have several possibilities: qrc or assets. Unless your files are big using Qt's resources system will simplify deployment since they are built-in your application.

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • W
          wwolff last edited by

          Hi SGaist,

          I try use qrc on the aplication and it fits perfectly with my needs and a Lot More!

          Amazing, this solve the problem since i have now the same folter for all platforms and being accessed at the same manner in the code.

          Beautifull!

          Since i will distribute the files with the software, now i dont need code a lot of stuff to mantain compatibility between the different plafforms...really Cool!

          Thanks so much for your help!

          Kind Regards.

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