What doesn't work exactly? For starters, I doubt your regex does what you think it does and secondly, your input mask seems to be invalid. Haven't used myself, but the input mask characters supported are here.
Why don't you show an example of what you consider valid input in the QLineEdit and any restrictions you want for that input data, etc.
Bookmarks