RoundedImage.qml 373 B

1234567891011121314151617181920212223
  1. import QtQuick 2.0
  2. import QtGraphicalEffects 1.15
  3. Image {
  4. id: root
  5. property bool rounded: true
  6. property real radius: 10
  7. antialiasing: true
  8. layer.enabled: rounded
  9. layer.effect: OpacityMask {
  10. maskSource: Item {
  11. width: root.width
  12. height: root.height
  13. Rectangle {
  14. anchors.fill: parent
  15. radius: root.radius
  16. }
  17. }
  18. }
  19. }