The input mask and validator are used -only- when the user is entering text into the line edit by typing or cutting and pasting. If you are calling setText() from inside your code, then the line edit will let you put anything you want into the edit box. The OP misunderstood this, I think.
Anyway, why would you want to display text like that in a line edit when it is forbidden for the user to type the same text? If you are trying to describe what the line edit should be used for, then either implement a tool tip on it or put a label next to it.




Reply With Quote


Bookmarks