#NEWLINE# def _create_contents( self , parent ) : #NEWLINE# #INDENT# label = QtGui . QLabel ( ) #NEWLINE# if ( parent . parent ( ) is not None ) : #NEWLINE# #INDENT# title = parent . parent ( ) . windowTitle ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# title = '' #NEWLINE# #UNINDENT# self . title = ( 'About %s' % title ) #NEWLINE# image = self . image . create_image ( ) #NEWLINE# path = self . image . absolute_path #NEWLINE# additions = '<br />' . join ( self . additions ) #NEWLINE# py_version = sys . version [ 0 : sys . version . find ( '(' ) ] #NEWLINE# qt_version = QtCore . __version__ #NEWLINE# label . setText ( ( _DIALOG_TEXT % ( path , additions , py_version , qt_version ) ) ) #NEWLINE# buttons = QtGui . QDialogButtonBox ( ) #NEWLINE# if self . ok_label : #NEWLINE# #INDENT# buttons . addButton ( self . ok_label , QtGui . QDialogButtonBox . AcceptRole ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# buttons . addButton ( QtGui . QDialogButtonBox . Ok ) #NEWLINE# #UNINDENT# buttons . connect ( buttons , QtCore . SIGNAL ( 'accepted()' ) , parent , QtCore . SLOT ( 'accept()' ) ) #NEWLINE# lay = QtGui . QVBoxLayout ( ) #NEWLINE# lay . addWidget ( label ) #NEWLINE# lay . addWidget ( buttons ) #NEWLINE# parent . setLayout ( lay )