Hello. I'm new to PyQt, so dont be to hard on me. I need help with creating a QRegExpValidator which would validate my input and would make it uppercase.<br>I came up with this by browsing this list and searching the net and Qt documentation, but it's not working.<br>
<br>class Validator(QtGui.QRegExpValidator):<br> def __init__(self, parent=None):<br> RegExp = QtCore.QRegExp('[A-Z]')<br> QtGui.QRegExpValidator.__init__(self, RegExp, parent)<br> <br> <br>
def fixup(self, input):<br> print 'fixup'<br> input.replace(0,100,input.toUpper())<br><br>Fixup is not getting called... Why?<br><br>I have also tried a solution where I made a regular regexp validator and a signal and slot which would make my input uppercase, but then that signal overrides the validator. <br>
<br>What is the proper way to achieve this?<br><br>Regards,<br>