[Qt-interest] qspinbox
Andre Somers
andre at familiesomers.nl
Tue Aug 3 13:37:00 CEST 2010
Op Di, 3 augustus, 2010 12:25 pm, schreef phil prentice:
> Hi
> I am using some QSpinBoxes in a dialog. These spinboxes have valid
> ranges.
> Ideally I would like to disable the Ok box if the user has completely
> deleted
> all the characters in the spinbox. Although I would be happy to check for
> this case on the Ok slot itself if I cant disable Ok.
>
> I've tryed all the obvious things like the valueChanged signals etc, but
> at
> the moment it seems to end up with the last correct value i.e.
> QAbstractSpinBox::CorrectToPreviousValue.
> I cant seem to detect that the curent text in the spinbox is null.
>
> Is there any nice way to do this (without deriving from QSpinBox)?
>
> Thanks for your help
Doesn't QAbstractSpinBox::text() provide you with the current text?
André
More information about the Qt-interest-old
mailing list