#include #include int main() { QPolygonF high, low; high << QPointF(293, 0) << QPointF(406.102, 225) << QPointF(556, 0); low << QPointF(79, -1) << QPointF(182.303, 60) << QPointF(673, -1); QPolygonF low_first_unite(low.united(high)); QPolygonF expected({ QPointF(79,-1), QPointF(182.303,60), QPointF(314.876,43.5194), QPointF(406.102,225), QPointF(546.162,14.7677), QPointF(673,-1), QPointF(79,-1) }); qDebug() << low_first_unite.united(high); // error qDebug() << expected; qDebug() << (expected == low_first_unite); high[1].ry() = 230; qDebug() << low_first_unite.united(high); // right result return 0; }