Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
doc_src_objecttrees.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
int
main
()
6
{
7
QWidget
window
;
8
QPushButton
quit(
"Quit"
, &
window
);
9
...
10
}
12
13
15
int
main
()
16
{
17
QPushButton
quit(
"Quit"
);
18
QWidget
window
;
19
20
quit.setParent(&
window
);
21
...
22
}
QPushButton
The QPushButton widget provides a command button.
Definition
qpushbutton.h:20
QWidget
The QWidget class is the base class of all user interface objects.
Definition
qwidget.h:99
main
int main()
[0]
Definition
doc_src_objecttrees.cpp:5
window
aWidget window() -> setWindowTitle("New Window Title")
[2]
qtbase
src
corelib
doc
snippets
code
doc_src_objecttrees.cpp
Generated by
1.9.7