示例#1
0
 def __init__(self, parent=None):
     """Constructor."""
     QtGui.QDialog.__init__(self)
     # Set up the user interface from Designer.
     # After setupUI you can access any designer object by doing
     # self.<objectname>, and you can use autoconnect slots - see
     # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
     # #widgets-and-dialogs-with-auto-connect
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.buttonBox.rejected.connect(self.reject)
     self.ui.buttonBox.accepted.connect(self.accept)