[Interest] Random question Friday: Why no area() for Rects and Sizes?, path.join()?

Konstantin Tokarev annulen at yandex.ru
Fri Apr 12 19:51:34 CEST 2019

12.04.2019, 18:11, "Jason H" <jhihn at gmx.com>:
> 1. Area of concern
> I find myself wanting to know the area of rectangular things a lot. For Sizes and Rects: it's abs(width()*height()), but Rects might also have a offset from the origin.
> Either way, I was wondering why this was not added to Qt already? When working with images, it gives things like pixel counts and

I guess reason is the same as why Qt doesn't have classes like QTriangle or QEllipse. QRect's primary concern is GUI-related programming, not properties of particular geometric shape.


More information about the Interest mailing list