Layout issue: Widget cannot be resized below preferredSize



  • When I explicitly set the sceneRect on a QGraphicsScene, I suddenly cannot make the attached QGraphicsView smaller than that rectangle. When I let the GraphicsScene determine its sceneRect itself, I can make the view smaller, and get scrollbars.

    EDIT:
    Setting the sceneRect seems to cause the preferredSize to be set.
    The GraphicsView has a size policy of Grow+Shrink+Expand in both directions, and a minimum size of 0/0.
    Still, the QHBoxLayout managing it refuses to make it any smaller.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.