示例#1
0
 def menuAddNew(self):
     # do not create multiple instances.. use the same one
     if self.tedit is None:
         # set up a callback so when close we can refresh
         # our view of the accounts and targets
         closeCallback = (QTargetAndStatusView.refresh,
                          (self.parent().parent(), ))
         self.tedit = QTargetEditor(closeCallback=closeCallback)
     # make sure it is displayed (it hides it's self on save or cancel)
     self.tedit.show()