Juergen Spitzmueller wrote:

> Attached is a patch that adds validators to all remaining qt
> dialogs.
> 
> One problem remains: The vspace input widget in QDocument does not
> have a label, so the validator does not work. Angus, what can be
> done? Can we have a checkedwidget that uses an other widget than a
> label? If so, what is the best implementation?

What do you mean, "Doesn't work"? The constructor is:
        CheckedLineEdit(QLineEdit * input, QLabel * label = 0);

In turn  CheckedLineEdit::check() calls:

void setWidget(bool valid, QLineEdit * input, QLabel * label)
{
        if (valid)
                input->unsetPalette();
        else
                setWarningColor(input);

        if (!label)
                return;

        if (valid)
                label->unsetPalette();
        else
                setWarningColor(label);
}

so it seems that the thing is happy enough if you don't supply a 
label.

> I have detected a second minor problem, independent from the
> frontend: In some widgets (e.g. screen fonts in Prefs, scale in
> QGraphics), when I enter "10.3", I get the following value after
> reopening the dialog:
> 
> 10.30000019073486
> 
> Isn't this a bit too precise? ;-)

Looks like a 'save a float into a double' problem to me...

Does 'tostr(float(var))' solve it?

> I don't know the exact reason for this, maybe tostr is to blame?
> 
> Regards,
> Jürgen

-- 
Angus

Reply via email to