#NEWLINE# def resizeEvent( self , event ) : #NEWLINE# #INDENT# 'Reimplemented to size the table columns when the size of the table\n        changes. Because the layout algorithm requires that the available space\n        be known, we have to wait until the UI that contains this table gives it\n        its initial size.' #NEWLINE# QtGui . QTableView . resizeEvent ( self , event ) #NEWLINE# if self . _editor . auto_size : #NEWLINE# #INDENT# self . resizeColumnsToContents ( ) #NEWLINE# self . resizeRowsToContents ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# parent = self . parent ( ) #NEWLINE# if ( ( not self . _initial_size ) and parent and ( self . isVisible ( ) or isinstance ( parent , QtGui . QMainWindow ) ) ) : #NEWLINE# #INDENT# self . _initial_size = True #NEWLINE# if self . _editor . auto_size : #NEWLINE# #INDENT# self . resizeColumnsToContents ( ) #NEWLINE# self . resizeRowsToContents ( )