As pointed out above there is not enough information with just two points to specify an arc (presumably circular). Do you know the radius and two points, the centre and two points, or something else?
If you know the centre and radius then the bounding rectangle becomes trivial:
QRect bounds
(centre.
x()-radius, centre.
y()-radius,
2*radius,
2*radius
);
QRect bounds(centre.x()-radius, centre.y()-radius, 2*radius, 2*radius);
To copy to clipboard, switch view to plain text mode
You can calculate the radius if only the centre is known (you could probably use the QPoint::manhattanLength() function to approximate). You only need calculate the angle to/between the points at the centre to have the remaining arguments for QPainter::drawArc().
Bookmarks