def slot_animation(self, control): # print('56') if control.objectName() == 'toolButton_add': # self.model = DlgModel(self) # rect = self.rect() # self.model.setGeometry(rect.x() + rect.width(), rect.y(), self.model.width(), rect.height()) # Utils.doAnim(self.model) model = DlgModel(self) model.init_ui() rect = self.rect() model.setGeometry(rect.x() + rect.width(), rect.y(), model.width(), rect.height()) Utils.doAnim(model) elif control.objectName() == 'toolButton_edit': # if self.card: # return print('toolButton_edit') self.card = DlgCard(self) rect = self.rect() self.card.setGeometry(rect.x() + rect.width(), rect.y(), self.card.width(), rect.height()) Utils.doAnim(self.card) self.card.update_card(0, False)
def show_card(self, index): print('show_card') rect = self.rect() dlg = DlgCard(index, self) dlg.setGeometry(rect.x() + rect.width(), rect.y(), dlg.width(), rect.height()) Utils.doAnim(dlg, self)