This class provides a form which displays SQL field data from a record buffer. Because QDataView does not support editing it uses less resources than a QDataBrowser. This class is well suited for displaying read-only data from a SQL database.
.PP
If you want a to present your data in an editable form use QDataBrowser; if you want a table-based presentation of your data use QDataTable.
.PP
The form is associated with the data view with setForm() and the record is associated with setRecord(). You can also pass a QSqlRecord to the refresh() function which will set the record to the given record and read the record's fields into the form.
Clears the default form's values. If there is no default form, nothing happens. All the values are set to their 'zero state', e.g. 0 for numeric fields, "" for string fields.
.SH "QSqlForm * QDataView::form ()"
Returns the default form used by the data view, or 0 if there is none.
Causes the default form to display the contents of \fIbuf\fR. If there is no default form, nothing happens.The \fIbuf\fR also becomes the default record for all subsequent calls to readFields() and writefields(). This slot is equivalant to calling:
.PP
.nf
.br
myView.setRecord( record );
.br
myView.readFields();
.br
.fi
.PP
See also setRecord() and readFields().
.SH "void QDataView::setForm ( QSqlForm * form )\fC [virtual]\fR"
Sets the form used by the data view to \fIform\fR. If a record has already been assigned to the data view, the form will display that record's data.
.PP
See also form().
.SH "void QDataView::setRecord ( QSqlRecord * record )\fC [virtual]\fR"
Sets the record used by the data view to \fIrecord\fR. If a form has already been assigned to the data view, the form will display the data from \fIrecord\fR in that form.