The algorithm takes a list of QPointF (a QPolygonF) and selects among them the ones that will be the vertices of the polygon which contains all of them. The number of vertices of the polygon should be the minimum necessary to contain all of them and maintain the shape convex.
Currently the code is a bit ugly, i need to add better checks for equality, accounting for floating point error and also support for QPoint, so integer coordinates.