Revision control
Copy as Markdown
//! [radius-property]
\qmlproperty real \1::radius
This property defines the corner radius used to define a rounded rectangle.
This property may be overridden by the individual corner radius properties.
\sa topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius
//! [radius-property]
//! [radius-properties]
\qmlproperty real \1::topLeftRadius
\qmlproperty real \1::topRightRadius
\qmlproperty real \1::bottomLeftRadius
\qmlproperty real \1::bottomRightRadius
If set, these properties define the individual corner radii. A zero value defines that corner
to be sharp, while a positive value defines it to be rounded. When unset, the value of \l
radius is used instead.
These properties are unset by default. Assign \c undefined to them to return them to the unset
state.
In the following example, \l radius is set to \c 10, and \c topLeftRadius to \c 0:
\snippet \2 \3
\image pathrectangle.png {Rectangle outline with three rounded corners and
one beveled corner}
\sa radius
//! [radius-properties]
//! [bevel-property]
\qmlproperty bool \1::bevel
This property defines whether the corners of the rectangle are beveled.
Setting it to \c false results in either sharp or rounded corners,
depending on the values of the individual \l radius properties.
This property may be overridden by the individual bevel properties.
\snippet \2 \3
\image pathrectangle-bevel.png
{Rectangle with the beveled top-left and bottom-right corners}
\sa topLeftBevel, topRightBevel, bottomLeftBevel, bottomRightBevel
//! [bevel-property]
//! [bevel-properties]
\qmlproperty bool \1::topLeftBevel
\qmlproperty bool \1::topRightBevel
\qmlproperty bool \1::bottomLeftBevel
\qmlproperty bool \1::bottomRightBevel
If set, these properties define the individual corner bevels. Setting them
to \c false results in either sharp or rounded corners, depending on the
values of the individual \l radius properties. Setting them to \c true
results in bevelled corners. When unset, the value of \l bevel is used
instead.
These properties are unset by default. Assign \c undefined to them to
return them to the unset state.
In the following example, \c bottomRightBevel is set to true:
\snippet \2 \3
\image pathrectangle.png {Rectangle outline with three rounded corners and
one beveled corner}
\sa bevel
//! [bevel-properties]
//! [corner-shape-property]
\qmlproperty enumeration \1::cornerShape
This property defines how the corners of the rectangle are rendered:
sharp/rounded (\c PathRectangle.Rounded, the default), cut off in a
straight line (\c PathRectangle.Bevel), or rendered as a smooth
"squircle"-style curve (\c PathRectangle.Squircle).
\value PathRectangle.Rounded The corner is a plain circular arc (or sharp,
if \l radius is \c 0). This is the default.
\value PathRectangle.Bevel The corner is cut off in a straight line.
\value PathRectangle.Squircle The corner is rounded using a curve whose
curvature changes gradually, rather than switching abruptly from a
straight line into a circular arc. This gives the corner a softer,
more organic look, popularized by app icons and UI designs
(sometimes called "squircle" or "continuous" corners).
This property may be overridden by the individual corner shape properties.
\snippet \2 \3
\image pathsquircle.png
\sa topLeftCornerShape, topRightCornerShape, bottomLeftCornerShape, bottomRightCornerShape
//! [corner-shape-property]
//! [corner-shape-properties]
\qmlproperty enumeration \1::topLeftCornerShape
\qmlproperty enumeration \1::topRightCornerShape
\qmlproperty enumeration \1::bottomLeftCornerShape
\qmlproperty enumeration \1::bottomRightCornerShape
If set, these properties define the individual corner shapes, overriding
\l cornerShape for that corner. When unset, the value of \l cornerShape is
used instead.
These properties are unset by default. Assign \c undefined to them to
return them to the unset state.
\snippet \2 \3
\sa cornerShape
//! [corner-shape-properties]