Readjust the Custom QGraphicsWIdget's size on inserting widget
问题 I have created a custom QGraphicsWidget with the ability to resize the widget in the scene. I can also add predefined widgets such as buttons, labels, etc. to my custom widget. I now have two problems. The first being that the widget doesn't change the size (to re-adjust) upon inserting a new label or LineEdit widget as a result newly inserted widget stays out of the custom widget border. The second problem is encountered when I try to change the setContentMargins of the QGraphicsLayout to