initialize sub component
self.Stack = QStackedWidget (self)
self.Stack.addWidget (self.stack1)
self.Stack.addWidget (self.stack2)
self.Stack.addWidget (self.stack3)
事件触发关联
self.leftlist.currentRowChanged.connect(self.display)
切换页面
def display(self,i):
self.Stack.setCurrentIndex(i)