How to find intersection of two rectangle in qt?

How to find intersection of two rectangle(i.e.QRect) in qt??


if any intersection between two rectangle is there ,the function will return true something like that..

@Bharathi
Did you read the link ?
Its right under the function @koahnig suggested.bool QRect::intersects(const QRect &rectangle) const Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel that is within both rectangles), otherwise returns false.
It does exactly that.

Give me an example,it will be more useful@mrjj

@Bharathi seriously ?
//bool QRect::intersects(const QRect &rectangle) const bool trueOrNot = myRectangle.intersects(withOtherRectangle); //?