Thnaks for the inputs.
Now I have found a way to make my <COUNTER> non editable using the mask

Qt Code:
  1. lineEdit->setInputMask("xxxx\<\C\O\U\N\T\E\R\>");
To copy to clipboard, switch view to plain text mode 

Now thw problem is I am able to enter only 4 characters before <COUNTER> but i want to allow the user to enter maximum of 91 charcters.

What should I modify on the reg expression to achieve this?