Change color of text (a word) in qlinedit PYQT5
Unsolved
Qt for Python
-
I have situation where I want to detect for specific words (we have file) in user entered text in qlinedit, so i want to highlight that text.. So for highlighting i want to change color of that specific color found in qlinedit text... Is it possible? If yes then how can i achieve it in pyqt5...
-
@aadil50
There are several ways to do this. This forum has How to change color only in selected letters in QLineEdit?Not sure whether you really need a
QTextEdit
rather than aQLineEdit
.Think ahead to what you want to achieve here. Do you want to look at a QSyntaxHighlighter?