diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-12-01 09:07:50 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-12-07 08:56:46 +0100 |
commit | fe66830abe869d7e7244c77779c9ff7aa51037c3 (patch) | |
tree | 461b3c7b0d274111d39b02cf1e78670d629f642e /src/quick/doc | |
parent | a6cea4deacf9bbca51b15ac32f8f5530acb57dc0 (diff) |
Doc: Make algorithm for distributing sizes in layouts more explicit
Pick-to: 6.2
Fixes: QTBUG-98127
Change-Id: I1c27f03a6a61e8af12548ffaaeff5775476ed3c8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc b/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc index 369c2f4444..429bd6e854 100644 --- a/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc +++ b/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc @@ -103,9 +103,16 @@ \l{Layout::minimumWidth}{minimum}, \l{Layout::preferredWidth}{preferred}, and \l{Layout::maximumWidth}{maximum} sizes of all items where \l{Layout::fillWidth}{Layout.fillWidth} or \l{Layout::fillHeight}{Layout.fillHeight} is set to \c true. + + The \l{Layout::preferredWidth}{preferred} width and height is the \e actual width and + height of an item if the layout is not bound to a specific size itself. If the layout is set + to a specific size, it will distribute additional space based on the ratio of preferred sizes + of its items (taking minimum and maximum sizes into account). + For instance, the following will produce a layout with two rectangles lying side-by-side that stretches horizontally. The azure rectangle can be resized from 50x150 to 300x150, and the plum - rectangle can be resized from 100x100 to ∞x100. + rectangle can be resized from 100x100 to ∞x100. As long as the minimum and maximum width of each + item is not reached, the plum rectangle will have two times the width of the azure one. \snippet qml/windowconstraints.qml rowlayout |