summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/shared/hoverpoints.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <[email protected]>2023-10-24 17:41:51 +0200
committerVolker Hilsheimer <[email protected]>2023-10-27 16:22:59 +0200
commit7c59c5ed13dd796b4a77a56cb7badc34aead1adb (patch)
tree82e80c50bb3c3cdee77b0b1cdd486ccd43b629fd /examples/widgets/painting/shared/hoverpoints.cpp
parent333650c596890fb5117c3ab5c4295838600248f2 (diff)
Examples: remove OpenGL code paths from painting examples
The extra code for using the OpenGL paint engine is significant enough to be distracting from what the examples are supposed to show. If we want to show how to use QPainter on an OpenGL widget, then we can make dedicated and documented examples for that, in the OpenGL category. And we have such examples in the Qt OpenGL module anyway. As is, the examples feel more like manual tests of the OpenGL paint engine; if we need more coverage there, then we can add it there. Change-Id: I7b56ea6d08c02cd0a1050ab03991656a0538498d Reviewed-by: Laszlo Agocs <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Eirik Aavitsland <[email protected]>
Diffstat (limited to 'examples/widgets/painting/shared/hoverpoints.cpp')
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp
index a9f76084e19..1df6f214ae5 100644
--- a/examples/widgets/painting/shared/hoverpoints.cpp
+++ b/examples/widgets/painting/shared/hoverpoints.cpp
@@ -6,10 +6,6 @@
#include <algorithm>
-#if QT_CONFIG(opengl)
-#include <QtOpenGL/QOpenGLWindow>
-#endif
-
HoverPoints::HoverPoints(QWidget *widget, PointShape shape)
: QObject(widget),
m_widget(widget),
@@ -230,17 +226,7 @@ bool HoverPoints::eventFilter(QObject *object, QEvent *event)
void HoverPoints::paintPoints()
{
QPainter p;
-#if QT_CONFIG(opengl)
- ArthurFrame *af = qobject_cast<ArthurFrame *>(m_widget);
- if (af && af->usesOpenGL() && af->glWindow()->isValid()) {
- af->glWindow()->makeCurrent();
- p.begin(af->glWindow());
- } else {
- p.begin(m_widget);
- }
-#else
p.begin(m_widget);
-#endif
p.setRenderHint(QPainter::Antialiasing);