My Code:
Ui_startscreen.setupUi(self,self.areaplace)
self.FRAME_BUTTON.mousePressEvent = self.open_sec_view;
def open_sec_view(self,e):
Ui_sec.setupUi(self,self.areaplace);
Okey and now I have three python files, first -> start-program.py, second -> main.py, third -> secview.py
start-program.py is base QT GUI file with blank frame -> self.areaplace when program start self.areaplace include Ui_startscreen(main.py). During the click Ui_startscreen -> self.FRAME_BUTTON I need remove self.areaplace layout and clear view but when I'm using:
self.horizontalLayout.deleteLater()
self.areaplace.findChild(QtGui.QWidget).deleteLater()
console return me this error:
QLayout: Attempting to add QLayout "" to QWidget "secview", which already has a layout
I know I must to delete/remove layout but I don't know how :/ When I comment horizontalLayout every works fine but I have a lot of files and I need to use function to delete layout Can you help me ? :)