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
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
4
#
include
<
QPushButton
>
5
6
//![open]
7
int
main
()
8
{
9
//![open]
10
11
{
12
//![example1]
13
QWidget window;
14
QPushButton quit(
"Quit"
, &window);
15
//...
16
//![example1]
17
}
18
19
{
20
//![example2]
21
QPushButton quit(
"Quit"
);
22
QWidget window;
23
24
quit.setParent(&window);
25
//...
26
//![example2]
27
}
28
29
//![close]
30
}
31
//![close]
main
int main()
[open]
Definition
doc_src_objecttrees.cpp:7
qtbase
src
corelib
doc
snippets
code
doc_src_objecttrees.cpp
Generated on
for Qt by
1.14.0