The code creates QTextBrowser window filled with the lines of text. I would like to select all the words matching "Long Line" How to achieve it? from PyQt4 import QtCore, QtGui app = QtGui.QApplication([]) view = QtGui.QTextBrowser() for i in range(25): view.append(10*('Long Line of text # %004d '%i) ) view.setLineWrapMode(0) view.find('Long Line') view.show() app.exec_() Continue reading...