Resizing QGraphicsView as per the image loaded and keeping the aspect ratio at all times
问题 I have 3 QGraphicsView and 1 QOpenGLWidget laid out in QGridLayout in the center surrounded by other widgets on all 3 sides as shown in the pic below: All my widgets can be resized using QSplitter around them. As shown in the pic below: What do i want: QGraphicsView should always maintain a fixed size equivalent to image size. On resizing using QSplitter the view should resize based on the aspect ratio of the image but not the image itself as we can compare in the pics. The height and width