OK. I will look into the plugins approach.
Is dynamically loading UI files to be avoided in Qt development ? What are
the limitations (so I can learn about them) ?
Cheers
On Mon, 3 May 2021 at 12:17, Max Paperno wrote:
> I guess since you're loading the UI dynamically, you'll need to either
>
I guess since you're loading the UI dynamically, you'll need to either
go the "plugin" route or subclass QUiLoader.
https://forum.qt.io/topic/68045/can-t-load-custom-widget-using-quiloader
I'm not sure why you're using dynamic UI loading in the first place, or
how you expect any custom objects
Thanks Max,
I tried the promotion approach and created the corresponding class (which
subclass from QOpenGLWidget) but when I ran the code, I can the following
message
```
"QFormBuilder was unable to create a custom widget of the class
'MyOpenGLWidget'; defaulting to base class 'QOpenGLWidget'.
Hi Nicholas,
What you want to do is create your custom QOpenGLWidget first (it could
be the bare minimum to start with, even just a header file with the
class declaration). Then in Qt Creator/Designer you want to "promote"
the placeholder QOpenGLWidget to your custom version. If you search o
Hi,
I used designer to create a QOpenGLWidget on a MainWindow
I can retrieve the widget via findChild()
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 vi