How to style characters from index x (eg. x=10) to end of text in QLineEdit?
Example:
Text in QLineEdit:
0123456789
And I want make characters from index 2 (that is 2) to the end should be bold.
0123456789
How to style characters from index x (eg. x=10) to end of text in QLineEdit?
Example:
Text in QLineEdit:
0123456789
And I want make characters from index 2 (that is 2) to the end should be bold.
0123456789
Copyright © 2021 Jogjafile Inc.
QLineedit
is a one line of plain text which you may not easily handle such character formatting. On the other hand Qt provides text widgets for plain and rich text, that can accept formatting such as html. For instance theQTextEdit
widget can be used and render such formatting of text with html tags.