Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
src_gui_graphicsview_qgraphicsproxywidget.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
<
QtWidgets
>
5
6
//! [0]
7
int
main
(
int
argc,
char
**argv)
8
{
9
QApplication app(argc, argv);
10
11
QTabWidget *tabWidget =
new
QTabWidget;
12
13
QGraphicsScene scene;
14
QGraphicsProxyWidget *proxy = scene.addWidget(tabWidget);
15
16
QGraphicsView view(&scene);
17
view.show();
18
19
return
app.exec();
20
}
21
//! [0]
22
23
void
snippets
()
24
{
25
{
26
//! [1]
27
QGroupBox *groupBox =
new
QGroupBox(
"Contact Details"
);
28
QLabel *numberLabel =
new
QLabel(
"Telephone number"
);
29
QLineEdit *numberEdit =
new
QLineEdit;
30
31
QFormLayout *layout =
new
QFormLayout(groupBox);
32
layout->addRow(numberLabel, numberEdit);
33
34
QGraphicsScene scene;
35
QGraphicsProxyWidget *proxy = scene.addWidget(groupBox);
36
37
QGraphicsView view(&scene);
38
view.show();
39
//! [1]
40
}
41
{
42
//! [2]
43
QGraphicsScene scene;
44
45
QLineEdit *edit =
new
QLineEdit;
46
QGraphicsProxyWidget *proxy = scene.addWidget(edit);
47
48
edit->isVisible();
// returns true
49
proxy->isVisible();
// also returns true
50
51
edit->hide();
52
53
edit->isVisible();
// returns false
54
proxy->isVisible();
// also returns false
55
//! [2]
56
}
57
}
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
snippets
void snippets()
[0]
Definition
src_corelib_tools_qhash.cpp:376
qtbase
src
widgets
doc
snippets
code
src_gui_graphicsview_qgraphicsproxywidget.cpp
Generated on
for Qt by
1.18.0