diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-02-24 15:27:28 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-02-28 11:36:50 +0100 |
commit | 5f31212791b4a044e2a0b62bb66b7d07c2494402 (patch) | |
tree | 90f9465f70acafb763e3c83c9d8022f3fbbbaca0 /examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc | |
parent | 9c7c6e657ab848f5c252aa780a18e58ead3ee2f8 (diff) |
graphgallery example: Create the window containers with a parent
This avoids the QWindow being created as a top level window with a frame.
Pick-to: 6.5
Task-number: QTBUG-110698
Change-Id: I0a1116f833dd61c43a113c0e7a74a5181c1ee9b9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc')
-rw-r--r-- | examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc b/examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc index aca8c1a7..c4fdd854 100644 --- a/examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc +++ b/examples/datavisualization/graphgallery/doc/src/graphgallery.qdoc @@ -34,15 +34,18 @@ \section2 Creating the Application - First, in \c{bargraph.cpp}, instantiate Q3DBars and a window container for it: + First, in \c{bargraph.cpp}, instantiate Q3DBars: \snippet graphgallery/bargraph.cpp 0 - The call to QWidget::createWindowContainer is required, as all data visualization graph classes - (Q3DBars, Q3DScatter, Q3DSurface) inherit QWindow. This is the only way to use a class that - inherits QWindow as a widget. + Then, create the widget, and horizontal and vertical layouts. - Then, create horizontal and vertical layouts. Add the graph and the vertical layout to the + The graph is embedded in a window container using + QWidget::createWindowContainer(). This is required because all data + visualization graph classes (Q3DBars, Q3DScatter, Q3DSurface) inherit + QWindow. This is the only way to use a class inheriting QWindow as a widget. + + Add the graph and the vertical layout to the horizontal one: \snippet graphgallery/bargraph.cpp 1 |