[Development] QML Rectangle corner radius API for Qt 6.7
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Fri Dec 22 13:20:36 CET 2023
Il 22/12/23 11:15, André Somers ha scritto:
> I can see two options. The simplest option is to have a `radii`
> property, which is a grouped property containing the `topLeft`,
> `topRight`, `bottomLeft` and `bottomRight` properties as a floating
> point value as we have now. I think that would be cleaner than the
> current state of things.
While at it, it should be aptly named `cornersRadii` or similar.
`radius` has always violated Qt API guidelines. A rectangle doesn't have
a radius. We shouldn't be doing the same mistake again.
> The second option is to actually allow for some more customization, and
> have a `corners` property, where each corner again is named as in the
> `radii` above, but would itself be a grouped property that could not
> only contain `radius` but also `color` (and perhaps other properties in
> the future*). Setting different colors for each of the corners would
> allow for way more flexible gradients than what we have at the moment.
I'm not sure how this would look like in code, though?
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20231222/09acaf3c/attachment.bin>
More information about the Development
mailing list