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:
name=None) |
If a name is given, a label is created and added to the layout.
InputItem objects have the following methods:
) |
) |
val) |