[Qt-interest] Customizing QSpinBox in Qt4

Lars Amsel lars.amsel at signalion.com
Tue Jun 30 07:55:04 CEST 2009


Hi Alex,

Malyushytsky, Alex wrote:
>>> This works. What I dislike is, that I have to subclass the spin box to
>>> change something I consider to be a property.
> 
> Why do you dislike an idea of subclassing? The only thing came to my mind
> it was inconvenience of using QDesigner with subclasses in Qt3 (creating
> and managing addons added extra complexity) . Qt4 added "Promoting Widgets"
> feature which fixed that problem.

As I said in my initial mail, I don't like the idea of subclassing for 
changing things that I suppose to be a property. To my experience this leads 
either to a uncontrolled growth of subclasses or one fat subclass containing a 
lot of incoherent extensions, typically called QExSpinBox or something 
similar. I don't like both. That's why I asked for a solution that avoids 
subclassing.

Someone told me via mail, that on his system (Qt 4.5.1) he can enter values 
beyond min/max range at least for QDoubleSpinBox. That is not true for my 
system (Qt 4.5.1/4.5.2 with MinGW on WinXP) neither for QSpinBox nor for 
QDoubleSpinBox. Can somebody confirm that?

regards

Lars



More information about the Qt-interest-old mailing list