diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-25 07:21:05 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-25 07:21:53 +0200 |
commit | e28e91ae99b8c3859899e04cc9370534c7c7b86d (patch) | |
tree | cca81b1e745be4f25aab78e8e917c2324594e539 /src/widgets/widgets/qmainwindow.cpp | |
parent | 5ea233ca6782eb27adf596515cb66ef3dadc1d5e (diff) | |
parent | ebfad73b4e44fe6db8059200da105b4b87888718 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/corelib/animation/qpropertyanimation.cpp
src/gui/image/qicon.cpp
tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
Diffstat (limited to 'src/widgets/widgets/qmainwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index 9172168761..fae3aebba4 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -249,14 +249,7 @@ void QMainWindowPrivate::init() An example of how to create menus follows: - \code - void MainWindow::createMenus() - { - fileMenu = menuBar()->addMenu(tr("&File")); - fileMenu->addAction(newAct); - fileMenu->addAction(openAct); - fileMenu->addAction(saveAct); - \endcode + \snippet code/src_widgets_widgets_qmainwindow.cpp 0 The \c createPopupMenu() function creates popup menus when the main window receives context menu events. The default @@ -283,12 +276,7 @@ void QMainWindowPrivate::init() An example of toolbar creation follows: - \code - void MainWindow::createToolBars() - { - fileToolBar = addToolBar(tr("File")); - fileToolBar->addAction(newAct); - \endcode + \snippet code/src_widgets_widgets_qmainwindow.cpp 1 \section2 Creating Dock Widgets @@ -1231,9 +1219,8 @@ Qt::DockWidgetArea QMainWindow::dockWidgetArea(QDockWidget *dockwidget) const to the relative weight of the sizes. Example: - \code - resizeDocks({blueWidget, yellowWidget}, {20 , 40}, Qt::Horizontal); - \endcode + \snippet code/src_widgets_widgets_qmainwindow.cpp 2 + If the blue and the yellow widget are nested on the same level they will be resized such that the yellowWidget is twice as big as the blueWidget |