[PyQt] QAbstractSpinBox.fixup() error

2010-02-16 Thread David Wolfe
Hi, all. Been a bit confused recently by the behavior of QAbstractSpinBox.fixup(). I have a class that derives from QSpinBox with the goal of ensuring that the user only enters integers whose last two digits form a number between 0 and 31, inclusive. For example, 19900 is valid, as is 19931;

Re: [PyQt] QAbstractSpinBox.fixup() error

2010-02-16 Thread Phil Thompson
On Tue, 16 Feb 2010 07:10:51 -0500, David Wolfe dwo...@fifthsally.com wrote: Hi, all. Been a bit confused recently by the behavior of QAbstractSpinBox.fixup(). I have a class that derives from QSpinBox with the goal of ensuring that the user only enters integers whose last two digits form a

Re: [PyQt] QAbstractSpinBox.fixup() error

2010-02-16 Thread David Wolfe
I thought I could do 'final' validation by overriding fixup(), but I keep seeing the following error in the console: TypeError: invalid result type from IdSpinBox.fixup() The input is a mutable QString. Your normalize_id() function needs to modify the QString it is passed. Thanks, Phil,