I'm trying to put a new customized widget when the user press a button, using layout->addWidget(mywidget) where layout is a QVBoxLayout, but it's not working.
Tried: - Passing this to the widget constructor as parent - Passing the layout pointer as the parent - Passing 0 as the parent - The scrollArea pointer where the customized widget should be in as the parent
None works. When layout->addWidget is called in the constructor it works though.