`IntValidatorStrict` verifies additional condition: int number can not contain commas, since it can't be converted to int number directly.
| 389 | |
| 390 | |
| 391 | class IntValidatorStrict(QIntValidator): |
| 392 | """ |
| 393 | `IntValidatorStrict` verifies additional condition: int number can not |
| 394 | contain commas, since it can't be converted to int number directly. |
| 395 | """ |
| 396 | |
| 397 | def validate(self, text, pos): |
| 398 | result = super().validate(text, pos) |
| 399 | # Additional condition: the number can not contain ",". For some reason |
| 400 | # the standard validators ignore commas at the end of the number. |
| 401 | if "," in text[pos:]: |
| 402 | result = (QIntValidator.Invalid, result[1], result[2]) |
| 403 | return result |
| 404 | |
| 405 | |
| 406 | class IntValidatorRelaxed(IntValidatorStrict): |
no outgoing calls