I use Qt designer to design the UI. When implementing the design into the code, I use the [multiple inheritance approach](http://qt-project.org/doc/qt-5.0/qtdesigner/designer-using-a-ui-file.html#the-multiple-inheritance-approach). There's no real reason why I use this method, I just found it to be easier.

Anyway, when I looked into the generated header file I noticed in the setupUi() function that everything is allocated in heap. I don't really need the objects to outlive it's parent and according to [this](https://stackoverflow.com/questions/11477523/when-and-why-to-declare-member-variables-on-the-heap-c), in my case, it shouldn't be allocated in heap.

In situations where the parent object is just a small modal dialog allocated in stack, wouldn't it be a waste that it's UI objects are allocated in heap?

Is there a work-around for this? Should I just stop worrying? I haven't found a situation where this has become a problem but I'm still curious about it. In fact, it's not a problem at all. I just want to know.