Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
doc_src_qt4-mainwindow.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5
MainWindow::MainWindow
(
QWidget
*parent)
6
:
QMainWindow
(parent)
7
{
9
10
12
fileToolbar->setAllowedAreas(
Qt::TopToolBarArea
|
Qt::BottomToolBarArea
);
13
addToolBar(
Qt::TopToolBarArea
, fileToolbar);
15
16
18
setCorner(
Qt::TopLeftCorner
,
Qt::LeftDockWidgetArea
);
19
setCorner(
Qt::BottomLeftCorner
,
Qt::LeftDockWidgetArea
);
20
setCorner(
Qt::TopRightCorner
,
Qt::RightDockWidgetArea
);
21
setCorner(
Qt::BottomRightCorner
,
Qt::RightDockWidgetArea
);
23
24
26
QWidget
*centralWidget =
new
QWidget
(
this
);
27
setCentralWidget(centralWidget);
MainWindow::MainWindow
MainWindow()
[17]
Definition
src_corelib_kernel_qobject.cpp:63
QMainWindow
The QMainWindow class provides a main application window.
Definition
qmainwindow.h:25
QWidget
The QWidget class is the base class of all user interface objects.
Definition
qwidget.h:99
Qt::BottomLeftCorner
@ BottomLeftCorner
Definition
qnamespace.h:1269
Qt::TopRightCorner
@ TopRightCorner
Definition
qnamespace.h:1268
Qt::TopLeftCorner
@ TopLeftCorner
Definition
qnamespace.h:1267
Qt::BottomRightCorner
@ BottomRightCorner
Definition
qnamespace.h:1270
Qt::RightDockWidgetArea
@ RightDockWidgetArea
Definition
qnamespace.h:1198
Qt::LeftDockWidgetArea
@ LeftDockWidgetArea
Definition
qnamespace.h:1197
Qt::BottomToolBarArea
@ BottomToolBarArea
Definition
qnamespace.h:1217
Qt::TopToolBarArea
@ TopToolBarArea
Definition
qnamespace.h:1216
qtbase
src
widgets
doc
snippets
code
doc_src_qt4-mainwindow.cpp
Generated by
1.10.0