Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_widgets_widgets_qmainwindow.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4//! [0]
5 void MainWindow::createMenus()
6 {
7 fileMenu = menuBar()->addMenu(tr("&File"));
8 fileMenu->addAction(newAct);
9 fileMenu->addAction(openAct);
10 fileMenu->addAction(saveAct);
11//! [0]
12
13//! [1]
14 void MainWindow::createToolBars()
15 {
16 fileToolBar = addToolBar(tr("File"));
17 fileToolBar->addAction(newAct);
18//! [1]
19
20//! [2]
21 resizeDocks({blueWidget, yellowWidget}, {20 , 40}, Qt::Horizontal);
22//! [2]