RoundButton
The RoundButton is a standard Button that is styled with fully rounded corners. Its actual shape depends on its width and height properties: if they are equal, it will be a circle; if the width is greater than the height, it will form a pill or capsule shape.
The PillButton component, which is inherently checkable, is derived from RoundButton.
Basic RoundButton Examples
A RoundButton can be used just like a standard Button, with its shape adapting to its dimensions.
Pill Shape (Width > Height):

qml
import QtQuick 2.15
import RinUI
// ...
RoundButton {
text: qsTr("Submit")
width: 120 // Width is greater than height
height: 40
onClicked: console.log("Pill-shaped RoundButton clicked")
}Key Properties
radius:real- (Alias for background's radius) Controls the corner radius. InRoundButton, the background'sradiusis dynamically bound toheight / 2, ensuring fully rounded corners that adapt to the button's height.text:string- Text label for the button.icon.name:string- Fluent icon name for the button.icon.source:url- Custom image icon for the button.highlighted:bool- Iftrue, typically changes thebackgroundColorto the theme's primary color.flat:bool- Iftrue, generally removes the border and makes the background transparent unless hovered or highlighted.enabled:bool- Whether the control is interactive. Defaults totrue.
As RoundButton inherits from Button, all standard Button properties (like primaryColor, backgroundColor for specific states) and signals (like onClicked) are available. Its primary distinction is the enforced fully rounded background.
Usage Notes
- For a perfect circle, set
widthandheightto the same value. These are often ideal for icon-only buttons. - If
widthis greater thanheight, the button will naturally take on a pill or capsule shape. - The
PillButtoncomponent is a specializedRoundButtonthat addscheckablebehavior by default and links itscheckedstate to thehighlightedvisual state. If you need a checkable round button,PillButtonmight be more direct.