Layout questions (GraphicsView)
-
-
In a QGraphicsGridLayout, let's assume a cell within the grid is too big for a certain widget(because another widget in the grid requires the room).
How do I specify how the widget that is too small is aligned? Left/Top, Right/Bottom or Center? -
How do I determine the minimum size required for any QGraphicsLayout to satisfy the minimum size requirements of all contained widgets?
Context: I want to make an editor where the user can "stick" widgets to each other on the fly. That is, move a widget close to the edge of an existing widget, and it is "glued" to the other widget. Continue with third widget, and build a whole little layout that way.
Sounds like anchor layout to me.
However, I do not want to specify the exact size of the layout by setting it's geometry. Initially, it's size will simply be the sum of the sizes of the widgets contained, but it should be allowed to "grow" if changes to an individual widget increase that widget's minimum size.
And the layout itself would, in turn, not be part of a bigger layout, but "free-floating" in the scene.
What I am looking for is a way to determine the minimum width and height that layout needs in order to satisfy all the minimum size needs of it's content.
-