Im using Qt Creator 3.2.1. Using the Qt Designer I made the basic design: I added a custom widget (CustomWidget widget) to my mainwindow by adding a normal QWidget and promoting it to my custom one. Within that custom widget I added a QGraphicsView (QGraphicsView view).
The Object browser of Qt Designer displays the hierarchy of the items correctly: view within widget and widget within mainwindow.
However, the ui_mainwindow.h that is generated by the form gives me:
// in ui_mainwindow.h
class Ui_MainWindow
{
public:
CustomWidget *widget;
QGraphicsView *view;
// ...
};
When I really expected:
// in ui_mainwindow.h
class Ui_MainWindow
{
public:
CustomWidget *widget;
// ...
};
// in customwidget.h
class CustomWidget
{
public:
QGraphicsView *view;
// ...
};
Is a nested widget of another widget not supposed to be a member of it?
How to adjust my class design in the Qt Designer to make view member of widget?