Qt validating user input
I've been testing with Masks and Validators, but i got no sucess untill now. One column in the QTable View is CURRENCY type, but it is not showing correctly the value. A couple of things that might be something to consider.
For example, the value 1234.50 should be presented in format "1.234,50" (because I'm using Brazilian Real), however, the QLine Edit presents in the format "1234.5", removing the zero and not exchange point by comma. 1) Try setting the view item as a persistent editor.
If this is for business, you will have to consider what exactly you are trying to accomplish.
Is it just to make sure that the user inputs something other than rubbish?
The problem is so complex, actually, that the complete, industry-standard, regex for it is actually broken.
As it is, the code so far doesn't even come close to properly validating an email address.I have to write a program to validate an email address. I wanted to work through everything individually, and I sort of understand what you were doing.not really.To do this I have to use the following criteria: •The email address must start with a letter (no numbers or symbols) •There must be an @ somewhere in the string that is located BEFORE the dot •There must be text after the @ symbol but BEFORE the dot •There must be a dot •There must be text after the dot I have started the program..I cannot figure out how to use correctly. I understand your sentiment, but while you may be helping some people by giving them code, those that learn nothing are actually being hindered. The currently supported values are ‘lost_focus’, ‘return_pressed’, and ‘auto’. The list of actions which should cause the client to submit its text to the server for validation and update.