PDA

View Full Version : how to set paragraph indent for selected text in QTextEdit



ad3d
13th April 2012, 06:03
Hi Guys,

I am trying to create a small app like word. While using word, we can set paragraph indent for selected paragraph or text (we can set the mark from where text should start for that selected paragraph or line)

How can i achieve the same using QTextEdit? Can someone please help me out on this?

Thanx in advance

myta212
13th April 2012, 09:05
Hi,
Check QTextEdit documentations about :

tabChangesFocus : bool
This property holds whether Tab changes focus or is accepted as input.

tabStopWidth : int
This property holds the tab stop width in pixels.

You can detect a new paragraph by Enter character.
So, if user press enter keyboard, you can automatically add tab character in the new QTextEdit line.
Maybe this explaining help you. :)

Best regards,

myta212