Discussion:
[Development] QOpenGLWidget vs. QGLWidget
Yves Bailly
2014-07-31 11:22:03 UTC
Permalink
Greetings all,

I've just read the new features for the upcoming Qt 5.4, here:
http://qt-project.org/wiki/New-Features-in-Qt-5.4

...and I noticed this:
"Deprecated features: Qt Gui: The QtOpenGL module, that is, the QGL classes
are deprecated since QGLWidget has a suitable replacement now."

Will the new QOpenGLWidget class be usable like the old QGLWidget, notably
as a background for a QGraphicsView? allowing to draw QGraphicsItem, even
widgets, on top of an OpenGL scene...

Regards,

--
/- Yves Bailly - Software developer -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
than
Agocs Laszlo
2014-07-31 18:03:25 UTC
Permalink
Hello,

Yes, setViewport() will continue to work with QOpenGLWidget too.

Note that all this does not mean existing code has to migrate away from QGLWidget. It is not going to disappear. If it works, just keep using it.

Best regards,
Laszlo
________________________________________
From: development-bounces+laszlo.agocs=***@qt-project.org [development-bounces+laszlo.agocs=***@qt-project.org] on behalf of Yves Bailly [***@verosoftware.com]
Sent: Thursday, July 31, 2014 1:22 PM
To: ***@qt-project.org
Subject: [Development] QOpenGLWidget vs. QGLWidget

Greetings all,

I've just read the new features for the upcoming Qt 5.4, here:
http://qt-project.org/wiki/New-Features-in-Qt-5.4

...and I noticed this:
"Deprecated features: Qt Gui: The QtOpenGL module, that is, the QGL classes
are deprecated since QGLWidget has a suitable replacement now."

Will the new QOpenGLWidget class be usable like the old QGLWidget, notably
as a background for a QGraphicsView? allowing to draw QGraphicsItem, even
widgets, on top of an OpenGL scene...

Regards,

--
/- Yves Bailly - Software developer -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
Yves Bailly
2014-08-01 06:06:06 UTC
Permalink
Post by Agocs Laszlo
Yes, setViewport() will continue to work with QOpenGLWidget too.
Great! :-)
Post by Agocs Laszlo
Note that all this does not mean existing code has to migrate away from QGLWidget.
It is not going to disappear. If it works, just keep using it.
Fine, however QGLWidget's status moving to "deprecated" is the first step
on the road to "obsolete", then sooner or later "removed"... So I guess
new codes should use QOpenGLWidget, while old ones should migrate little
by little.

Is there already some doc somewhere, describing the differences between
QGLWidget and QOpenGLWidget? not only the API, also the internals maybe.

Regards,

--
/- Yves Bailly - Software developer -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks t
Thiago Macieira
2014-08-02 16:18:24 UTC
Permalink
Post by Yves Bailly
Post by Agocs Laszlo
Yes, setViewport() will continue to work with QOpenGLWidget too.
Great! :-)
Post by Agocs Laszlo
Note that all this does not mean existing code has to migrate away from
QGLWidget.>
It is not going to disappear. If it works, just keep using it.
Fine, however QGLWidget's status moving to "deprecated" is the first step
on the road to "obsolete", then sooner or later "removed"...
For us, deprecated == obsolete and removed == Qt 6.
Post by Yves Bailly
So I guess
new codes should use QOpenGLWidget, while old ones should migrate little
by little.
Right, that's a good idea.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Loading...