Dirty corners of round rectangle not smooth

Solution for Dirty corners of round rectangle not smooth
is Given Below:

I have simple rounded rectangle but like 4 side or like draw circular with radius: width/2 the 4 corners are not smooth. I add some effect like Gaussian blur but can not handle that.
I tried with Bezier curve but I had some issues. As you can see these images the dirty of corners is obviously.

enter image description here

corners (not smooth):

enter image description here

other side (smoothed):

enter image description here

Window {
    id: window
    width: 401
    height: 400
    visible: true
    
    color: 'gray'   

    Slider{
        id: slider
        from: 1
        to: 5
        onValueChanged: console.log("value :"+value)
    }

    Rectangle{
        id: rec
        x: 90
        y:150

        color: 'transparent'
        border.color: "#262626"
        border.width: 1

        width: Math.round(parent.width * .5)
        height: Math.round(width*.6)

        radius: 10
        layer.enabled: true

    }
    GaussianBlur {
        anchors.fill: rec
        source: rec
        radius: 2
        samples: 30
        deviation: 1
        clip: true
    }

}

My propose is 👇 (draw with Adobe Illustrator):

enter image description here

enter image description here

This is just regular antialiasing playing here. Running the code with antialiasing: false in Rectangle will result in a jagged edge instead of a blurry edge:

Left no Antialiasing, right with Antialiasing

In rasterisation (converting mathematic shapes into pixels) there is always a tradeoff between jaggyness and blurryness. When used in a application with more complex shapes this won’t be noticable any more!

For more information on this topic the keywords would be: rasterisation, aliasing, antialiasing.

Here is the minimal example of it working without the blurry edge but aliased:

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")
    Rectangle{
        id: rec
        x: 90
        y:150
        antialiasing: false
        color: 'transparent'
        border.color: "#262626"
        border.width: 1

        width: Math.round(parent.width * .5)
        height: Math.round(width*.6)

        radius: 10
        layer.enabled: true

    }
}