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. Providing absolute/relative file path
Forum Updated to NodeBB v4.3 + New Features

Providing absolute/relative file path

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bitu
    wrote on last edited by
    #1

    File path passed from qml is taken in relative to Build directory qml path.I want it to be relative of source directory paths I am passing it.
    One option would be to copy given folder path inside qml directory,but that will be putting a huge limitation from user's point of view.

    Thanks in advance,any help would be greatly appreciated...................

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,
      You can put QML files in the Resource File.
      See "this":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-deployment.html#managing-resource-files-with-the-qt-resource-system

      157

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bitu
        wrote on last edited by
        #3

        thanks for reply.
        I know this,but I don't want to put images inside qrc as binary size will increase.

        Also,I have another query. Putting relative path provides me "file:///" whereas I have to manually append "file:///" while providing absolute image path.

        Any kinds of suggestions are welcome.

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          bq. I know this,but I don’t want to put images inside qrc as binary size will increase.

          Then you need to provide absolute paths or relative paths ( if the file you know is several directories up using "../../../clover.png" for e.g )

          bq. Also,I have another query. Putting relative path provides me “file:///” whereas I have to manually append “file:///” while providing absolute image path.

          AFAIK, Yes

          157

          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