QDataView(3qt)

๐Ÿ“ฆ version 3.3.8b, in fedora 43, fedora 44

๐Ÿ’– QDataView(3qt) โ€” bestie edition ๐Ÿ’–

okay so this is the man page for QDataView, from the Qt 3 era (the page itself is qdataview.3qt), and honestly? she's a whole vibe. read-only, low-maintenance, doesn't need much. let's get into it ๐Ÿซถ


โœจ NAME โœจ

QDataView โ€” Read-only SQL forms ๐ŸŒˆ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <qdataview.h>

Inherits QWidget. yep, she's a widget, she's in the family tree ๐Ÿ’…

๐Ÿ‘‘ Public Members ๐Ÿ‘‘

  • QDataView ( QWidget * parent = 0, const char * name = 0, WFlags fl = 0 )
  • ~QDataView ()
  • virtual void setForm ( QSqlForm * form )
  • QSqlForm * form ()
  • virtual void setRecord ( QSqlRecord * record )
  • QSqlRecord * record ()

๐ŸŽ€ Public Slots ๐ŸŽ€

  • virtual void refresh ( QSqlRecord * buf )
  • virtual void readFields ()
  • virtual void writeFields ()
  • virtual void clearValues ()

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So the QDataView class provides read-only SQL forms. that's the whole personality. no editing, no drama.

This class gives you a form that displays SQL field data from a record buffer. and here's the slay: because QDataView doesn't support editing, it uses less resources than a QDataBrowser does. so if all you're doing is showing read-only data from a SQL database, this is literally the one. it's giving minimal, it's giving efficient, it's giving main character energy for display-only workloads โœจ

okay but if you want a form you can actually edit? go use QDataBrowser. and if you want your data presented as a table? that's QDataTable. different girls, different jobs, no competition ๐Ÿ’…

The form gets associated with the data view via setForm(), and the record gets associated via setRecord(). you can also just hand a QSqlRecord straight to the refresh() function โ€” that'll set the record to the given record and read the record's fields into the form. two birds, one function, iconic ๐ŸŽ€

See also Database Classes.


๐Ÿ’œ MEMBER FUNCTION DOCUMENTATION ๐Ÿ’œ

QDataView::QDataView ( QWidget * parent = 0, const char * name = 0, WFlags fl = 0 )

Constructs a data view which is a child of parent, called name, and with widget flags fl. newborn data view, so cute ๐Ÿผ

QDataView::~QDataView ()

Destroys the object and frees any allocated resources. she's done, she's resting, she earned it ๐Ÿ˜Œ

void QDataView::clearValues () [virtual slot]

Clears the default form's values. If there is no default form, nothing happens. and every value gets set to its 'zero state' โ€” like 0 for numeric fields, "" for string fields. factory reset but make it SQL ๐Ÿ’…

QSqlForm * QDataView::form ()

Returns the default form used by the data view, or 0 if there is none. no form, no problem, you just get a lil 0 ๐Ÿซถ

See also setForm().

void QDataView::readFields () [virtual slot]

Causes the default form to read its fields from the record buffer. If there is no default form, or no record, nothing happens. like, she's not gonna make up data for you bestie, that's not her job ๐Ÿ˜ญ

See also setForm().

QSqlRecord * QDataView::record ()

Returns the default record used by the data view, or 0 if there is none. empty-handed? you get a 0. periodt.

See also setRecord().

void QDataView::refresh ( QSqlRecord * buf ) [virtual slot]

Causes the default form to display the contents of buf. If there is no default form, nothing happens.

and heads up: buf also becomes the default record for all subsequent calls to readFields() and writefields(). so she's not just borrowing it for a sec, she's keeping it ๐Ÿ‘‘

This slot is equivalant to calling:

myView.setRecord( record );
myView.readFields();

(yes the original says "equivalant", we're preserving the spelling exactly, do not come for me ๐Ÿ™ˆ)

See also setRecord() and readFields().

void QDataView::setForm ( QSqlForm * form ) [virtual]

Sets the form used by the data view to form. If a record has already been assigned to the data view, the form will display that record's data. she's ready when you are ๐Ÿ’–

See also form().

void QDataView::setRecord ( QSqlRecord * record ) [virtual]

Sets the record used by the data view to record. If a form has already been assigned to the data view, the form will display the data from record in that form. matching sets, we love to see it โœจ

See also record().

void QDataView::writeFields () [virtual slot]

Causes the default form to write its fields to the record buffer. If there is no default form, or no record, nothing happens. no form? no record? no writing. simple math ๐Ÿงฎ

See also setForm().


๐Ÿ” SEE ALSO ๐Ÿ”


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. (yes, actually read it, don't just scroll past ๐Ÿ’€)


โœ๏ธ AUTHOR โœ๏ธ

Generated automatically from the source code. no human author, just robots being efficient, we respect it ๐Ÿค–


๐Ÿ› BUGS ๐Ÿ›

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. (fr fr, a good bug report is a love letter to maintainers ๐Ÿซถ)

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. so like, she's a bonus, not the canon ๐Ÿ‘‘

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qdataview.3qt) and the Qt version (3.3.8). include both, don't be shy, it helps ๐Ÿ’…


and that's the page!! brought to you by Trolltech AS, dated 2 February 2007, man page QDataView(3qt), Qt version 3.3.8 โ€” mwah, take care of her, she's vintage ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from