I have an object derived from QWidget. If I say object->show() it works perfectly, but I want to insert that object into a gridLayout of another class, also derived from QWidget.
I’ve tried to add it with addWidget(*widget) like a regular pushButton (for ex) would work.
I have an object derived from QWidget . If I say object->show() it works
Share
I’ll take a wild guess: Check the
sizePolicy()andsizeHint()of your widget. It might be that your widget is inside the layout, but resized to 0x0.Try to
setMinimumSize(); your widget might then appear if my guess is right.