QGraphicsProxyWidgets: document that using OpenGL comes with limitations

The documentation already states that high-performance scenarios are not
a usecase that mixes well with QGraphicsProxyWidget. However, we can
generally not test or support all combinations of widgets and styles
with an OpenGL viewport.

That Qt's basic framework code has to be graphicsview aware is already
unfortunate enough; adding more special checks all over the place
hurts maintainability, makes the general usecase slower, and poorly
serves use-cases that are beyond of what QGraphicsProxyWidget was
designed for.

Change-Id: Iff43ead292240f7b068dcf9206bb3bee3031b1dc
Fixes: QTBUG-63687
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-02-17 15:32:39 +01:00
parent 6248bfd9e5
commit 3c20b9b973
2 changed files with 7 additions and 1 deletions

View File

@ -183,7 +183,9 @@ QT_BEGIN_NAMESPACE
\warning This class is provided for convenience when bridging
QWidgets and QGraphicsItems, it should not be used for
high-performance scenarios.
high-performance scenarios. In particular, embedding widgets into a scene
that is then displayed through a QGraphicsView that uses an OpenGL viewport
will not work for all combinations.
\sa QGraphicsScene::addWidget(), QGraphicsWidget
*/

View File

@ -123,6 +123,10 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
\image graphicsview-view.png
\note Using an OpenGL viewport limits the ability to use QGraphicsProxyWidget.
Not all combinations of widgets and styles can be supported with such a setup.
You should carefully test your UI and make the necessary adjustments.
\sa QGraphicsScene, QGraphicsItem, QGraphicsSceneEvent
*/