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. [solved] Image with rounded corner
Forum Update on Monday, May 27th 2025

[solved] Image with rounded corner

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.4k 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.
  • B Offline
    B Offline
    bemami_b
    wrote on last edited by
    #1

    Hello guy,

    I'm new to QML and I would like to add border to my image. My border also have to be a circle with my image inside of it. I've tried some code that I found in other topics but nothing fit for what I want.

    To explain my self better here an example of what I want.
    I have this:
    !http://img4.hostingpics.net/pics/947080tonystark2.jpg(Before)!

    and I want this:
    !http://img4.hostingpics.net/pics/409322tonystark2.png(After)!

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      You can do it with "opacitymask":http://qt-project.org/doc/qt-5.0/qtgraphicaleffects/qml-qtgraphicaleffects1-opacitymask.html#example

      157

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bemami_b
        wrote on last edited by
        #3

        Thanks a lot, that's what I was looking for.

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          That's great :) You can mark the post as solved. Just edit the title and prepend [solved]

          157

          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