[PyKDE] QString and QValidator on Qt 4
Andreas Pakulat
apaku at gmx.de
Tue Nov 21 22:43:09 GMT 2006
On 21.11.06 22:55:11, Simon Edwards wrote:
> I've come up against a problem in Qt 4 with QValidator and its fixup() method.
> This code working on Qt 3:
>
> def fixup(self,inputstr):
> return unicode(inputstr).replace(":","")
Things changed between Qt3 and Qt4 ;)
> But it doesn't seem to work like this on PyQt 4. PyQt4's fixup() seems to
> require no return value. Is in-place modification of the QString argument
> expected???
Yes, check the Qt4 docs, the fixup methods takes a reference to a
QString, so it can modify it without the need to return a new QString
object.
Andreas
--
Don't relax! It's only your tension that's holding you together.
More information about the PyQt
mailing list