PDA

View Full Version : Highlight current line in textedit



aaditya190
22nd November 2013, 06:56
I want to set the background color of the entire line in which I am currently typing with some color. I referred to various links but they showed formatting of text. I wish to format the background of current line. Is there any way to do it?

thomas@itest
22nd November 2013, 16:11
Please use the docs and helps of Qt wich are really good before posting here ...
The "code editor example" answers your question !

saman_artorious
22nd November 2013, 16:30
I want to set the background color of the entire line in which I am currently typing with some color. I referred to various links but they showed formatting of text. I wish to format the background of current line. Is there any way to do it?

take a look at setStyleSheet() property of the widgets in the docs.