0

I want to derive a child class from an already customized widget in qt creator:

MyCustomWidget.h:

class MyCustomWidget : public QOpenGLWidget
{
    Q_OBJECT
...

MyChildCustomWidget.h:

class MyChildCustomWidget : public MyCustomWidget
{
    Q_OBJECT
...

Ok this is easy.

But how do I tell qt creator/designer to use MyChildCustomWidget?? It only allows me to use MyCustomWidget in the list of custom widget.

Nagama Inamdar
  • 2,851
  • 22
  • 39
  • 48
MoeJoe
  • 1
  • 1

1 Answers1

0

In Qt Designer right click on the widget and then:

enter image description here

Read also Using Custom Widgets with Qt Designer and Creating Custom Widgets for Qt Designer (thanks maxik for adding these links)

mvidelgauz
  • 2,176
  • 1
  • 16
  • 23
  • 1
    Some reference here http://doc.qt.io/qt-5.6/designer-using-custom-widgets.html for placeholder widgets. More in depth integration documented here http://doc.qt.io/qt-5.6/designer-creating-custom-widgets.html. – maxik Jul 03 '16 at 10:00
  • @maxik Thank you, I added these links to the answer – mvidelgauz Jul 03 '16 at 10:23