blob: cc3b1678d0f8788159a23a5d34ea56a66b593df7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
QGraphicsScene scene;
QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit);
QGraphicsWidget *pushButton = scene.addWidget(new QPushButton);
QGraphicsWidget *form = new QGraphicsWidget;
scene.addItem(form);
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(form);
layout->addItem(textEdit);
layout->addItem(pushButton);
//! [0]
|