How to find intersection of two rectangle in qt?
-
wrote on 2 Dec 2017, 13:34 last edited by
How to find intersection of two rectangle(i.e.QRect) in qt??
-
wrote on 2 Dec 2017, 13:48 last edited by
-
wrote on 2 Dec 2017, 13:55 last edited by
if any intersection between two rectangle is there ,the function will return true something like that..
-
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.
-
wrote on 5 Dec 2017, 06:41 last edited by
Give me an example,it will be more useful@mrjj
-
@Bharathi seriously ?
//bool QRect::intersects(const QRect &rectangle) const bool trueOrNot = myRectangle.intersects(withOtherRectangle); //?
1/6