I wish to introduce text alignment in a textedit such that whenever I press ENTER key, It automatically takes 4 spaces in the next line just like the code editor in qt.... Is there any way to implement this? Can anyone help me out?