[PyQt] QDoubleSpinBox and decimal separator

simone simozack at yahoo.it
Fri May 16 11:15:08 BST 2008


Hi, I have a problem with a QDoubleSpinBox on Windows.

In my locale, the decimal separator is ',' and not '.'. If I try to 
write a decimal separator in a QDoubleSpinBox via the '.' button in the 
numeric pad, the spinbox doesn't accept the value and I have to hit the 
',' button under the 'k' key. This happens also in the QDoubleSpinBox 
example in the Qt (C++) Demo.

Obviously, the final user (me... :D) doesn't want this issue... :)

I think to subclass the QDoubleSpinBox to catch the keypress event. Is 
it possible to emit a ',' key press event when I hit the '.' in the 
numeric pad? If yes, have you some code to post? :D

Thanks,
Simone
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



More information about the PyQt mailing list