Clipping the child element area
Unsolved
QML and Qt Quick
-
Hi,
Just want crop the circuar area along with the green rectangleI would like to design a wafer.
import QtQuick 2.12 import untitled5 1.0 Rectangle { width: 400 height: 400 color: "black" radius: width / 2 border.color: "red" border.width: 3 clip: true Grid { x: 0 y: 0 rows: 10 columns: 10 spacing: 2 Repeater { model: 100 Rectangle { width: 40 height: 40 color: "lightgreen" } } } }
Can anyone help me to achieve this?
Thanks
-
@inforathinam said in Clipping the child element area:
Can anyone help me to achieve this?
OpacityMask sounds like what you want: https://doc.qt.io/qt-5/qml-qtgraphicaleffects-opacitymask.html