I have a QTextBrowser
and I want to select a part of the text inside, I need the position of the start and the end of the selection. I want to do that with mousePressEvent
and mouseReleaseEvent
. Here is my code,
class MainWindow(QMainWindow, TeamInsight.Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.setupUi(self)
def set_text(self):
self.textBrowser.setText('test strings are here')
textBrowser is inside a MainWindow. How do I implement mousePressEvent
and mouseReleaseEvent
for text in textBrowser