#NEWLINE# def initUI( self ) : #NEWLINE# #INDENT# currentLabel = QtGui . QLabel ( 'Current selection' , self ) #NEWLINE# currentLabel . setStyleSheet ( 'font-weight:bold; font-size: 15px;' ) #NEWLINE# currentWordsLabel = QtGui . QLabel ( 'Words: ' , self ) #NEWLINE# currentSymbolsLabel = QtGui . QLabel ( 'Symbols: ' , self ) #NEWLINE# self . currentWords = QtGui . QLabel ( self ) #NEWLINE# self . currentSymbols = QtGui . QLabel ( self ) #NEWLINE# totalLabel = QtGui . QLabel ( 'Total' , self ) #NEWLINE# totalLabel . setStyleSheet ( 'font-weight:bold; font-size: 15px;' ) #NEWLINE# totalWordsLabel = QtGui . QLabel ( 'Words: ' , self ) #NEWLINE# totalSymbolsLabel = QtGui . QLabel ( 'Symbols: ' , self ) #NEWLINE# self . totalWords = QtGui . QLabel ( self ) #NEWLINE# self . totalSymbols = QtGui . QLabel ( self ) #NEWLINE# layout = QtGui . QGridLayout ( self ) #NEWLINE# layout . addWidget ( currentLabel , 0 , 0 ) #NEWLINE# layout . addWidget ( currentWordsLabel , 1 , 0 ) #NEWLINE# layout . addWidget ( self . currentWords , 1 , 1 ) #NEWLINE# layout . addWidget ( currentSymbolsLabel , 2 , 0 ) #NEWLINE# layout . addWidget ( self . currentSymbols , 2 , 1 ) #NEWLINE# spacer = QtGui . QWidget ( ) #NEWLINE# spacer . setFixedSize ( 0 , 5 ) #NEWLINE# layout . addWidget ( spacer , 3 , 0 ) #NEWLINE# layout . addWidget ( totalLabel , 4 , 0 ) #NEWLINE# layout . addWidget ( totalWordsLabel , 5 , 0 ) #NEWLINE# layout . addWidget ( self . totalWords , 5 , 1 ) #NEWLINE# layout . addWidget ( totalSymbolsLabel , 6 , 0 ) #NEWLINE# layout . addWidget ( self . totalSymbols , 6 , 1 ) #NEWLINE# self . setWindowTitle ( 'Word count' ) #NEWLINE# self . setGeometry ( 300 , 300 , 200 , 200 ) #NEWLINE# self . setLayout ( layout )