blob: 2d2b1840faccdefdcdedc4a7d43be04ae1516971 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example widgets-scene3d
\title Qt 3D: Scene3D QML with Widgets Example
\ingroup qt3d-examples-qml
\brief A QWidget-based application with a QML scene containing a 3D scene.
\image widgets-scene3d.png
\e {widgets-scene3D} demonstrates visualizing a 3D scene from a
QWidget-based application using QQuickWidget.
The actual 3D scene is the same as in the \e {scene3d} example.
This approach is different from the one based on
QWidget::createWindowContainer() demonstrated in \e {basicshapes-cpp}
because it does not create a native window for the Qt 3D content. Rather,
it uses QQuickWidget, a genuine QWidget subclass to compose the Qt Quick
and Qt 3D content together with the traditional widgets.
\note Be aware of the performance implications. While this approach is very
flexible in the sense that it allows mixing QML and Qt 3D with widgets
without clipping or stacking issues, using Scene3D in a QQuickWidget
involves rendering to offscreen render targets (via framebuffer objects)
twice. This is not always desirable for more complex scenes. For those the
native window based approach shown in \e {basicshapes-cpp} will likely be a
better choice.
\include examples-run.qdocinc
*/
|