Suppose the following code I supposed to do a union of polyogn
Qt Code:
  1.  
  2. f<<QPointF(1,1)<<QPointF(10,29);
  3. g<<QPointF(100,100)<<QPointF(10,290);
  4.  
  5.  
  6. qSort(f.begin(),f.end(),lessThanPoint);
  7. qSort(g.begin(),g.end(),lessThanPoint);
  8. qDebug()<< f.united(g);
To copy to clipboard, switch view to plain text mode 
Why I get the following result:

QPolygonF(QPointF(1, 1)QPointF(1, 1)QPointF(10, 29)QPointF(1, 1)QPointF(10, 290)QPointF(100, 100)QPointF(10, 290)QPointF(1, 1))



I should have simply the union of the point (a polygon of 4 points).
Maybe I am missing something?
G