#NEWLINE# def __init__( self , editor , parent = None ) : #NEWLINE# #INDENT# ' Reimplemented to store the editor and set a delegate for drawing the\n            items in the popup menu. If there is more than one column, use a\n            TableView instead of ListView for the popup.\n        ' #NEWLINE# QtGui . QComboBox . __init__ ( self , parent ) #NEWLINE# self . _editor = width #NEWLINE# model = ImageEnumModel ( editor , self ) #NEWLINE# self . setModel ( model ) #NEWLINE# delegate = ImageEnumItemDelegate ( editor , self ) #NEWLINE# if ( editor . factory . cols > 1 ) : #NEWLINE# #INDENT# view = ImageEnumTablePopupView ( self ) #NEWLINE# view . setItemDelegate ( delegate ) #NEWLINE# self . setView ( view ) #NEWLINE# width = 0 #NEWLINE# for col in xrange ( self . _editor . factory . cols ) : #NEWLINE# #INDENT# width += view . sizeHintForColumn ( col ) #NEWLINE# #UNINDENT# view . setMinimumWidth ( width ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . setItemDelegate ( delegate )