diff options
author | John Tapsell <john.tapsell.ext@basyskom.de> | 2010-11-15 11:55:13 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-11-15 11:55:13 (GMT) |
commit | 1781b3c876b4e1025b2a85f4e7975c171b1a1404 (patch) | |
tree | 4b15aa0cac8d0c379fd3ce1f11e1c832f2559ca3 /src/gui/graphicsview/qgraphicsgridlayout.cpp | |
parent | 604c51f1fc5c79b7fad12cda911b06b9e6e5005f (diff) | |
download | Qt-1781b3c876b4e1025b2a85f4e7975c171b1a1404.zip Qt-1781b3c876b4e1025b2a85f4e7975c171b1a1404.tar.gz Qt-1781b3c876b4e1025b2a85f4e7975c171b1a1404.tar.bz2 |
Change the QGraphics*Layout documentation to match the code - that the default alignment is top-left.
This includes unit tests to confirm that the alignment is top-left in a
variety of different cases.
Merge-request: 894
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsgridlayout.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsgridlayout.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp index 3fc7f10..c3bb6c3 100644 --- a/src/gui/graphicsview/qgraphicsgridlayout.cpp +++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp @@ -64,6 +64,17 @@ removeAt() will remove an item from the layout, without destroying it. + \section1 Size Hints and Size Policies in QGraphicsGridLayout + + QGraphicsGridLayout respects each item's size hints and size policies, + and when the layout contains more space than the items can fill, each item + is arranged according to the layout's alignment for that item. You can set + an alignment for each item by calling setAlignment(), and check the + alignment for any item by calling alignment(). You can also set the alignment + for an entire row or column by calling setRowAlignment() and setColumnAlignment() + respectively. By default, items are aligned to the top left. + + \sa QGraphicsLinearLayout, QGraphicsWidget */ |