The highlighted
signal is emitted when an anchor in the text is highlighted, it doesn't fire when text is selected.
If you're interested in in changes of the selection, use the selectionChanged
signal (inherited from QTextEdit
)
Pergunta
Is there a signal that is sent by QTextBrowser when highlighting text?
self.textBrowser.highlighted.connect(self.test)
def test(self,argv_1):
print('This Worked')
When I tried this the signal didn't seem to be sent.
Solução
The highlighted
signal is emitted when an anchor in the text is highlighted, it doesn't fire when text is selected.
If you're interested in in changes of the selection, use the selectionChanged
signal (inherited from QTextEdit
)