summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src/basiclayouts.qdoc
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2014-06-04 18:11:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-10 15:56:59 +0200
commit857c82f8a4a29399733218f783241b839b939f58 (patch)
tree4adeff4c3cb6d59a002d1ca839933b08619898e8 /examples/widgets/doc/src/basiclayouts.qdoc
parent7da3228abbb77af653b716a3729fac9b20279bfb (diff)
Doc: Updated Layout examples.
-added links to and from the overviews. -added information on how to run the example. -updated copyright. Task-number: QTBUG-33597 Change-Id: Ib049cb94f136caa6916878959ae830248bd236b5 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Diffstat (limited to 'examples/widgets/doc/src/basiclayouts.qdoc')
-rw-r--r--examples/widgets/doc/src/basiclayouts.qdoc22
1 files changed, 13 insertions, 9 deletions
diff --git a/examples/widgets/doc/src/basiclayouts.qdoc b/examples/widgets/doc/src/basiclayouts.qdoc
index d219b7bff3..0066317165 100644
--- a/examples/widgets/doc/src/basiclayouts.qdoc
+++ b/examples/widgets/doc/src/basiclayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
@@ -28,31 +28,35 @@
/*!
\example layouts/basiclayouts
\title Basic Layouts Example
+ \brief Shows how to use the standard layout managers.
- \brief The Basic Layouts example shows how to use the standard layout
- managers that are available in Qt: QBoxLayout, QGridLayout and
- QFormLayout.
+ \e{Basic Layouts} shows how to use the standard layout managers that are
+ available in Qt: QBoxLayout, QGridLayout, and QFormLayout.
\image basiclayouts-example.png Screenshot of the Basic Layouts example
The QBoxLayout class lines up widgets horizontally or vertically.
QHBoxLayout and QVBoxLayout are convenience subclasses of QBoxLayout.
QGridLayout lays out widgets in cells by dividing the available space
- into rows and columns. QFormLayout, on the other hand, lays out its
+ into rows and columns. QFormLayout, on the other hand, sets its
children in a two-column form with labels in the left column and
input fields in the right column.
+ For more information, visit the \l{Layout Management} page.
+
+ \include examples-run.qdocinc
+
\section1 Dialog Class Definition
\snippet layouts/basiclayouts/dialog.h 0
The \c Dialog class inherits QDialog. It is a custom widget that
displays its child widgets using the geometry managers:
- QHBoxLayout, QVBoxLayout, QGridLayout and QFormLayout.
+ QHBoxLayout, QVBoxLayout, QGridLayout, and QFormLayout.
- We declare four private functions to simplify the class
- constructor: The \c createMenu(), \c createHorizontalGroupBox(),
- \c createGridGroupBox() and \c createFormGroupBox() functions create
+ There are four private functions to simplify the class
+ constructor: the \c createMenu(), \c createHorizontalGroupBox(),
+ \c createGridGroupBox(), and \c createFormGroupBox() functions create
several widgets that the example uses to demonstrate how the layout
affects their appearances.