QpainterPath::intersected function does not function properly in some rare cases. The experiencing behavior is not well defined: in the application I'm working on the function returns an empty QPainterPath, while in the standalone test case it just returns a wrong value. This discrepancy might be caused by the rounding errors.
The test case consists of two QPainterPaths: p1 and p2. They are intersected like this:
p1.intersected(p2) and p2.intersected(p1). The results should be equal, while they are not.