hello,

P and Q are two QPolygonF, with Q strictly included in P. (think about donut, Q is the hole)

This instruction :

Qt Code:
  1. PmQ = P.subtracted(Q)
To copy to clipboard, switch view to plain text mode 

provides a new polygon PmQ, I can easily break down to obtain two polygons, say A and B. One is P, other is Q.

Later on, I need two recognize
  1. - does PmQ comes from subtraction or union of two polygons ?
  2. - which one is the hole ? Is it A or B ?


As I do this a lot of times, I'd like to avoid testing if A is included in B or B included in A.

Is there a simple solution ?

Thanks for your answer.