summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-16 11:06:53 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-16 11:06:53 (GMT)
commit5da0667acb5bb025906183304a7bafafd36a3c8c (patch)
treece4433615b49fed5d35df8e4fcf05b608ff01fb0 /doc/src/snippets
parent95ea80e8d798527c6e0bb750f9a9746ec8c76e75 (diff)
parente5f43b4fb606b4001f271c20a1fe7e6c3d24457e (diff)
downloadQt-5da0667acb5bb025906183304a7bafafd36a3c8c.zip
Qt-5da0667acb5bb025906183304a7bafafd36a3c8c.tar.gz
Qt-5da0667acb5bb025906183304a7bafafd36a3c8c.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into doc-4.7
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/layouts/layouts.cpp42
1 files changed, 39 insertions, 3 deletions
diff --git a/doc/src/snippets/layouts/layouts.cpp b/doc/src/snippets/layouts/layouts.cpp
index 66c9b9d..58440f5 100644
--- a/doc/src/snippets/layouts/layouts.cpp
+++ b/doc/src/snippets/layouts/layouts.cpp
@@ -66,7 +66,9 @@ int main(int argc, char *argv[])
layout->addWidget(button5);
window->setLayout(layout);
-//! [4] //! [5]
+//! [4]
+ window->setWindowTitle("QHBoxLayout");
+//! [5]
window->show();
//! [5]
}
@@ -93,7 +95,9 @@ int main(int argc, char *argv[])
layout->addWidget(button5);
window->setLayout(layout);
-//! [10] //! [11]
+//! [10]
+ window->setWindowTitle("QVBoxLayout");
+//! [11]
window->show();
//! [11]
}
@@ -120,10 +124,42 @@ int main(int argc, char *argv[])
layout->addWidget(button5, 2, 1);
window->setLayout(layout);
-//! [16] //! [17]
+//! [16]
+ window->setWindowTitle("QGridLayout");
+//! [17]
window->show();
//! [17]
}
+ {
+//! [18]
+ QWidget *window = new QWidget;
+//! [18]
+//! [19]
+ QPushButton *button1 = new QPushButton("One");
+ QLineEdit *lineEdit1 = new QLineEdit();
+//! [19]
+//! [20]
+ QPushButton *button2 = new QPushButton("Two");
+ QLineEdit *lineEdit2 = new QLineEdit();
+ QPushButton *button3 = new QPushButton("Three");
+ QLineEdit *lineEdit3 = new QLineEdit();
+//! [20]
+//! [21]
+ QFormLayout *layout = new QFormLayout;
+//! [21]
+//! [22]
+ layout->addRow(button1, lineEdit1);
+ layout->addRow(button2, lineEdit2);
+ layout->addRow(button3, lineEdit3);
+
+ window->setLayout(layout);
+//! [22]
+ window->setWindowTitle("QFormLayout");
+//! [23]
+ window->show();
+//! [23]
+ }
+
return app.exec();
}