Fix contentsRect calculation.

QRectF takes either two points (top left / bottom right),
or separate coordinates (x/y) together with dimensions for width
and height.

Change-Id: Iac20e2abaa4a273ddf7605ffa306220717ae283a
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>