#NEWLINE# def sizeHint( self ) : #NEWLINE# #INDENT# 'Reimplemented to define a better size hint for the width of the\n        TableEditor.' #NEWLINE# size_hint = QtGui . QTableView . sizeHint ( self ) #NEWLINE# if ( self . _editor . factory is None ) : #NEWLINE# #INDENT# return size_hint #NEWLINE# #UNINDENT# width = self . style ( ) . pixelMetric ( QtGui . QStyle . PM_ScrollBarExtent , QtGui . QStyleOptionHeader ( ) , self ) #NEWLINE# for column in range ( len ( self . _editor . columns ) ) : #NEWLINE# #INDENT# width += self . sizeHintForColumn ( column ) #NEWLINE# #UNINDENT# size_hint . setWidth ( width ) #NEWLINE# return size_hint