Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Why does QGraphicsView::fitInView uses a hard coded margin?
Asperamanca last edited by Asperamanca
A lot of time has been spent using fitInView, and things never looked quite right.
And this code within fitInView is the reason:
int margin = 2; QRectF viewRect = viewport()->rect().adjusted(margin, margin, -margin, -margin);
Why would anyone put a hard coded margin with an arbitrary value and no way to override it in such a function? Any good reasons?
Pretty good question. You should bring it to the interest mailing list or the #qt IRC channel.