예제 #1
0
 def __init__(self, parent=None):
     Dialog.__init__(self, parent)
     self.ui = Ui_ContextMenu() 
     self.ui.setupUi(self)        
     # no window border pls
     self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.FramelessWindowHint)
     self._dynamic_widgets = []
     self._ui_visible = True
예제 #2
0
 def accept(self):
     """
     closes the menu object. This may be called several times
     and will do the right thing (e.g. if the actual UI object
     has been destroyed, it will just do nothing
     """
     if self._ui_visible:
         Dialog.accept(self)
         self._ui_visible = False