[Interest] How to use QOpenGLWidget from Qt Creator

Nicholas Yue yue.nicholas at gmail.com
Mon May 3 07:12:24 CEST 2021


Hi,

I used designer to create a QOpenGLWidget on a MainWindow

I can retrieve the widget via findChild<QOpenGLWidget*>()

My understanding is that to leverage the widget, there are a couple of
virtual methods that needs to be overridden e.g. paintGL(), resizeGL(),
initializeGL()

However, the widget I retrieve via findChild() will be the base class
without the overridden methods.

I must be missing something here.

Where can I read up more on how this can be resolved ?

The OpenGL examples I found did not use Qt Creator to create the UI

https://doc.qt.io/qt-5/qtopengl-hellogl2-example.html

Cheers
-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210502/872bff42/attachment.html>


More information about the Interest mailing list