Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qml image source not taking special character like #
Forum Updated to NodeBB v4.3 + New Features

Qml image source not taking special character like #

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.9k 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.
  • J Offline
    J Offline
    Jaswinder
    wrote on last edited by
    #1

    Hi,
    I am facing some problem with QML image tag. this is not taking # in path. Can some one tell me the way to do this. Or any way to path decoding in CPP file.
    @Image {
    id: bgImage
    width: rectMain.width
    height: rectMain.height
    fillMode: Image.Stretch
    smooth: true
    z: 0
    opacity: 0.940
    source: "C:/Users/Main/Music/music/Agneepath#/Agneepath.png"
    }@
    Thanks in advance.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      twsimpson
      wrote on last edited by
      #2

      "Image.source":http://qt-project.org/doc/qt-4.8/qml-image.html#source-prop is a URL, and '#' is a reserved character in URLs, you need to url-escape it as %23.
      @
      Image {
      id: bgImage
      width: rectMain.width
      height: rectMain.height
      fillMode: Image.Stretch
      smooth: true
      z: 0
      opacity: 0.940
      source: "file://C:/Users/Main/Music/music/Agneepath%23/Agneepath.png"
      }
      @

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jaswinder
        wrote on last edited by
        #3

        Hi,
        I tried this but this is also not working. Have you any other idea?

        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