Qt Forum

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

    [SOLVED]File path in QML

    QML and Qt Quick
    3
    6
    1759
    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.
    • J
      Javeria last edited by

      I'm displaying the images using list
      @property var imagesListModel: ["file:/original.jpg","file:/11.jpg","file:/test (1).jpg","file:/test (2).jpg","file:/test (3).jpg","file:/test (4).jpg","file:/test (5).jpg"]
      @
      This works if the the images are in the C: file but i cant display the images if i use the path of these images directly
      like in C: which i need to fix as i have to save the image of this path in a QImage object, is there nay way i can ifx these problem?

      1 Reply Last reply Reply Quote 0
      • C
        clochydd last edited by

        Hi,
        how do you use the pathname?
        You should use slash /, not backslash . "file:///c:/images/original.jpg"

        1 Reply Last reply Reply Quote 0
        • J
          Javeria last edited by

          yeh i use the same slash / its works for D: disk but not C:

          1 Reply Last reply Reply Quote 0
          • C
            clochydd last edited by

            Can you post both variables - for C: and D:?

            1 Reply Last reply Reply Quote 0
            • J
              Javeria last edited by

              ITs works now if i use file:/ and then C: s path, Thanks!

              1 Reply Last reply Reply Quote 0
              • D
                dasRicardo last edited by

                Please add [SOLVED] to your thread titles of all your solved threads.

                **Sorry for my english :)

                PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

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