#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# super ( Demo , self ) . __init__ ( ) #NEWLINE# ( x , y , w , h ) = ( 500 , 200 , 300 , 400 ) #NEWLINE# self . setGeometry ( x , y , w , h ) #NEWLINE# self . list_view = QtGui . QListView ( self ) #NEWLINE# ( x , y , w , h ) = ( 5 , 5 , 290 , 250 ) #NEWLINE# self . list_view . setGeometry ( x , y , w , h ) #NEWLINE# self . data_sources = create_data_source ( ) #NEWLINE# list_model = ListModel ( self . data_sources ) #NEWLINE# self . list_view . setModel ( list_model ) #NEWLINE# self . list_view . setIconSize ( QtCore . QSize ( 50 , 50 ) ) #NEWLINE# self . list_view . setSpacing ( 5 ) #NEWLINE# self . list_view . setUniformItemSizes ( True ) #NEWLINE# self . list_view . setSelectionMode ( QtGui . QAbstractItemView . ExtendedSelection )