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. Display image in qml Rectangle
QtWS25 Last Chance

Display image in qml Rectangle

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 245 Views
  • 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.
  • Q Offline
    Q Offline
    Queen
    wrote on last edited by
    #1

    I want display image in Rectangle qml component.

    But I did not see any property for this.

    Image component has source property but it is url.

    Pls help me

    Pl45m4P 1 Reply Last reply
    0
    • Q Queen

      I want display image in Rectangle qml component.

      But I did not see any property for this.

      Image component has source property but it is url.

      Pls help me

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Queen

      Something like this should work:

      Rectangle {
                          width: 100
                          height: 400
      
                          Image {
                              id: img1
                              source: "YourImage.png" // path to image or qrc resource path
                          }
                      }
      

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      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