summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/src/windows-and-dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/doc/src/windows-and-dialogs')
-rw-r--r--src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
index 7610174744..0e52944bb0 100644
--- a/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -226,7 +226,11 @@
We create a toolbar as a child of the main window, and add the desired
actions to it:
- \snippet mainwindows/sdi/mainwindow.cpp 0
+ \code
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newAct);
+ fileToolBar->addAction(openAct);
+ \endcode
\dots
\snippet code/doc_src_qt4-mainwindow.cpp 1