QRectangle fit functions added