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. What is wrong with Image in QML?
Forum Updated to NodeBB v4.3 + New Features

What is wrong with Image in QML?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 347 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.
  • G Offline
    G Offline
    Gourmet
    wrote on last edited by
    #1

    I load PNG image geotag.png in resource file:

    alt text

    In QML I try show image:

                Image {
                    x: 500
                    y: 100
                    source: "qrc:/resources/geotag.png"
                }
    

    But I get error:

    QML Image: Cannot open: qrc:/resources/geotag.png

    What is wrong?

    Pradeep P NP 1 Reply Last reply
    0
    • G Gourmet

      I load PNG image geotag.png in resource file:

      alt text

      In QML I try show image:

                  Image {
                      x: 500
                      y: 100
                      source: "qrc:/resources/geotag.png"
                  }
      

      But I get error:

      QML Image: Cannot open: qrc:/resources/geotag.png

      What is wrong?

      Pradeep P NP Offline
      Pradeep P NP Offline
      Pradeep P N
      wrote on last edited by
      #2

      @Gourmet
      Can you please show us your Compile Output ?
      Also please Run qmake to update the image.

      All the best.

      Pradeep Nimbalkar.
      Upvote the answer(s) that helped you to solve the issue...
      Keep code clean.

      G 1 Reply Last reply
      3
      • Pradeep P NP Pradeep P N

        @Gourmet
        Can you please show us your Compile Output ?
        Also please Run qmake to update the image.

        All the best.

        G Offline
        G Offline
        Gourmet
        wrote on last edited by Gourmet
        #3

        @Pradeep-P-N damn... qmake helped.

        G 1 Reply Last reply
        0
        • G Gourmet

          @Pradeep-P-N damn... qmake helped.

          G Offline
          G Offline
          Gourmet
          wrote on last edited by Gourmet
          #4

          But this is strange cause I used resources very often - and never had run qmake.

          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