summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qsizepolicy.qdoc
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@nokia.com>2012-07-25 14:57:20 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-27 03:27:16 +0200
commit17c74529e4d343424c53e6630cd8c14d8d4d3313 (patch)
tree30a8e1615d5dd5bde7d1ae6debe5cda80ef1c7d9 /src/widgets/kernel/qsizepolicy.qdoc
parentd4a3b41be4a499c3b11a065a0ba9355bf31ca43c (diff)
Describe an example usage of stretch in QSizePolicy documentation.
Martin Pejcoch suggested QSizePolicy's setVerticalStretch and setHorizontalStretch functions be better documented. This change gives sample usages. Task-number: QTBUG-18373 Change-Id: I54da8605f5e9e5f405c145b78865402baf78eee7 Reviewed-by: Martin Pejcoch <martin.pejcoch@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qsizepolicy.qdoc')
-rw-r--r--src/widgets/kernel/qsizepolicy.qdoc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/kernel/qsizepolicy.qdoc b/src/widgets/kernel/qsizepolicy.qdoc
index 3c7d1e858e..0e08732d3e 100644
--- a/src/widgets/kernel/qsizepolicy.qdoc
+++ b/src/widgets/kernel/qsizepolicy.qdoc
@@ -324,6 +324,11 @@
Sets the horizontal stretch factor of the size policy to the given \a
stretchFactor. \a stretchFactor must be in the range [0,255].
+ When two widgets are adjacent to each other in a horizontal layout,
+ setting the horizontal stretch factor of the widget on the left to 2
+ and the factor of widget on the right to 1 will ensure that the widget
+ on the left will always be twice the size of the one on the right.
+
\sa horizontalStretch(), setVerticalStretch(), setHorizontalPolicy()
*/
@@ -333,6 +338,12 @@
Sets the vertical stretch factor of the size policy to the given
\a stretchFactor. \a stretchFactor must be in the range [0,255].
+ When two widgets are adjacent to each other in a vertical layout,
+ setting the vertical stretch factor of the widget on the top to 2
+ and the factor of widget on the bottom to 1 will ensure that
+ the widget on the top will always be twice the size of the one
+ on the bottom.
+
\sa verticalStretch(), setHorizontalStretch(), setVerticalPolicy()
*/