summaryrefslogtreecommitdiffstats
path: root/doc/src/tutorials/widgets-tutorial.qdoc
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-01-05 11:07:20 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-01-05 11:07:20 (GMT)
commite3a3ae24e54a4461498ae8185b89bdf429e68574 (patch)
treea8e01cb94bcf599b3246f684e18a71a9a794d53b /doc/src/tutorials/widgets-tutorial.qdoc
parent04a3fdb6a243e00b809d3e81264fce077121862b (diff)
downloadQt-e3a3ae24e54a4461498ae8185b89bdf429e68574.zip
Qt-e3a3ae24e54a4461498ae8185b89bdf429e68574.tar.gz
Qt-e3a3ae24e54a4461498ae8185b89bdf429e68574.tar.bz2
qdoc: Replaced many raw-html cases with \div {something}.
Diffstat (limited to 'doc/src/tutorials/widgets-tutorial.qdoc')
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc82
1 files changed, 29 insertions, 53 deletions
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index df911a5..42c8852 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -133,19 +133,13 @@
In the following example, we use QWidget to create and show a window with
a default size:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/toplevel/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-toplevel.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {qt-code}
+ \table
+ \row
+ \o \snippet tutorials/widgets/toplevel/main.cpp main program
+ \o \inlineimage widgets-tutorial-toplevel.png
+ \endtable
+ \enddiv
To create a real GUI, we need to place widgets inside the window. To do
this, we pass a QWidget instance to a widget's constructor, as we will
@@ -161,19 +155,13 @@
passing \c window as the parent to its constructor. In this case, we add a
button to the window and place it in a specific location:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/childwidget/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-childwidget.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {qt-code}
+ \table
+ \row
+ \o \snippet tutorials/widgets/childwidget/main.cpp main program
+ \o \inlineimage widgets-tutorial-childwidget.png
+ \endtable
+ \enddiv
The button is now a child of the window and will be deleted when the
window is destroyed. Note that hiding or closing the window does not
@@ -189,19 +177,13 @@
construct a label and line edit widget that we would like to arrange
side-by-side.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/windowlayout/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-windowlayout.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {qt-code}
+ \table
+ \row
+ \o \snippet tutorials/widgets/windowlayout/main.cpp main program
+ \o \inlineimage widgets-tutorial-windowlayout.png
+ \endtable
+ \enddiv
The \c layout object we construct manages the positions and sizes of
widgets supplied to it with the \l{QHBoxLayout::}{addWidget()} function.
@@ -233,20 +215,14 @@
\c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a
QTableView arranged vertically.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/nestedlayouts/main.cpp first part
- \snippet tutorials/widgets/nestedlayouts/main.cpp last part
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-nestedlayouts.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {qt-code}
+ \table
+ \row
+ \o \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
+ \o \inlineimage widgets-tutorial-nestedlayouts.png
+ \endtable
+ \enddiv
Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()}
function to insert the \c{queryLayout} above the \c{resultView} table.