#NEWLINE# def create_browser( self , startdir ) : #NEWLINE# #INDENT# self . dirmodel = DirModel ( self ) #NEWLINE# self . dirmodel . setReadOnly ( False ) #NEWLINE# self . dirmodel . setRootPath ( '/' ) #NEWLINE# self . dirmodel . setFilter ( ( ( QtCore . QDir . Dirs | QtCore . QDir . Files ) | QtCore . QDir . NoDotAndDotDot ) ) #NEWLINE# self . menu = QtGui . QMenu ( self ) #NEWLINE# self . dirview . setModel ( self . dirmodel ) #NEWLINE# self . dirview . setSelectionMode ( QtGui . QAbstractItemView . ExtendedSelection ) #NEWLINE# self . dirview . setContextMenuPolicy ( QtCore . Qt . CustomContextMenu ) #NEWLINE# self . dirview . setColumnHidden ( 2 , True ) #NEWLINE# self . dirview . header ( ) . swapSections ( 4 , 1 ) #NEWLINE# self . dirview . header ( ) . resizeSection ( 0 , 300 ) #NEWLINE# self . dirview . header ( ) . resizeSection ( 4 , 220 ) #NEWLINE# self . dirview . header ( ) . resizeSection ( 3 , 124 ) #NEWLINE# self . dirview . setEditTriggers ( QtGui . QAbstractItemView . EditKeyPressed ) #NEWLINE# self . dirview . setItemDelegate ( BoldDelegate ( self ) ) #NEWLINE# self . dirview . setCurrentIndex ( self . dirmodel . index ( startdir ) )