There is a widget (Forma ()), in it a couple of buttons in layout`e. I add:
sub = QMdiSubWindow() sub.setAttribute(Qt.WA_DeleteOnClose) sub.setWidget(Forma()) self.mdi.addSubWindow(sub) sub.show()
It works, but when I stretch the window, my widget remains in place. But, in the next. example:
sub = QMdiSubWindow() sub.setAttribute(Qt.WA_DeleteOnClose) sub.setWidget(QPushButton('Show')) self.mdi.addSubWindow(sub) sub.show()
I get the desired result (when stretching the window, the button expands). How to do this with my widget?