8.13.10 InputItem class: A single input item, usually with a label in front.

The created widget is a QHBoxLayout which can be embedded in the vertical layout of a dialog.

This is a super class, which just creates the label. The input field(s) should be added by a dedicated subclass.

This class also defines default values for the name() and value() methods.

Subclasses should override: - name(): if they called the superclass __init__() method without a name; - value(): if they did not create a self.input widget who's text() is the return value of the item. - setValue(): always, unless the field is readonly.

Subclases can set validators on the input, like input.setValidator(QtGui.QIntValidator(input)) Subclasses can define a show() method e.g. to select the data in the input field on display of the dialog.

The InputItem class has this constructor:

class InputItem( name=None)
Creates a new inputitem with a name label in front.

If a name is given, a label is created and added to the layout.

InputItem objects have the following methods:

name( )
Return the widget's name.

value( )
Return the widget's value.

setValue( val)
Change the widget's value.