Important: Please read the Qt Code of Conduct -

rounded corners on one side of the rectangle

  • Hi,

    Can you please provide tips on how to create a rectangle with rounded corner on one side only in QML.


  • HI,

    you can use two rectangles

    Rectangle {
      id: roundRect
      radius: 5
    Rectangle {
      id: squareRect
      height: rondRect.radius
      anchors.bottom = roundRect.bottom
      anchors.left = roundRect.left
      anchors.right = roundRect.right

    This is an example and you can create a custom component where you can specify

    • color
    • radius
    • side of the square corners

Log in to reply