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_gui_graphicsview_qgraphicslinearlayout.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
6void example()
7{
8 //! [0]
9 QGraphicsScene scene;
10 QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit);
11 QGraphicsWidget *pushButton = scene.addWidget(new QPushButton);
12
13 QGraphicsWidget *form = new QGraphicsWidget;
14 scene.addItem(form);
15
16 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(form);
17 layout->addItem(textEdit);
18 layout->addItem(pushButton);
19 //! [0]
20}
void example()
[5]