Пример #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
Пример #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
Пример #3
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     self.bb.button(self.bb.Close).setFocus(Qt.OtherFocusReason)
     return ret
Пример #4
0
 def showEvent(self, ev):
     ret = QDialog.showEvent(self, ev)
     self.bb.button(self.bb.Close).setFocus(Qt.OtherFocusReason)
     return ret