Exemplo n.º 1
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     if self.is_question:
         try:
             self.bb.button(self.bb.Yes if self.default_yes else self.bb.No
                     ).setFocus(Qt.OtherFocusReason)
         except:
             pass  # Buttons were changed
     else:
         self.bb.button(self.bb.Ok).setFocus(Qt.OtherFocusReason)
     return ret
Exemplo n.º 2
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     if self.is_question:
         try:
             self.bb.button(self.bb.Yes if self.default_yes else self.bb.No
                     ).setFocus(Qt.OtherFocusReason)
         except:
             pass  # Buttons were changed
     else:
         self.bb.button(self.bb.Ok).setFocus(Qt.OtherFocusReason)
     return ret
Exemplo n.º 3
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     self.bb.button(self.bb.Close).setFocus(Qt.FocusReason.OtherFocusReason)
     return ret
Exemplo n.º 4
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     self.bb.button(self.bb.Close).setFocus(Qt.OtherFocusReason)
     return ret