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. How to make a particular area of qml view transparent
Qt 6.11 is out! See what's new in the release blog

How to make a particular area of qml view transparent

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    SoyFlutter
    wrote on last edited by
    #1

    There is a qml file like this:

    Item {
    width: 800
    height: 600

    Image {
        id: background
        width: 800
        height: 600
        source: "qrc:/resorces/background.png"
    }
    
    Rectangle {
        id: transframe
        x: 500
        y: 200
        width: 200
        height: 100
    }
    

    }

    How to make the area of transframe transparent, then I can see the grafic under background.

    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      hello @SoyFlutter, this can help you http://ebanshi.cc/questions/4494981/need-to-change-color-of-an-svg-image-in-qml

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SoyFlutter
        wrote on last edited by
        #3

        I asked the same question in another place, and got the answer.
        The link is https://stackoverflow.com/questions/47864841/how-to-make-a-particular-area-of-qml-view-transparent

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved