import QtQuick 2.13 Item { id: root property int radius property string color: "white" property bool topLeftRadiusEnable: false property bool topRightRadiusEnable: false property bool buttonLeftRadiusEnable: false property bool buttonRighttRadiusEnable: false layer.enabled: true Rectangle { id: main anchors.fill: parent color: root.color radius: root.radius } Rectangle { visible: !topLeftRadiusEnable width: main.radius height: main.radius color: root.color } Rectangle { visible: !topRightRadiusEnable width: main.radius height: main.radius x: parent.width - width color: root.color } Rectangle { visible: !buttonLeftRadiusEnable width: main.radius height: main.radius y: parent.height - height color: root.color } Rectangle { visible: !buttonRighttRadiusEnable width: main.radius height: main.radius x: parent.width - width y: parent.height - height color: root.color } }