1QSqlEditorFactory(3qt)                                  QSqlEditorFactory(3qt)
2
3
4

NAME

6       QSqlEditorFactory - Used to create the editors used by QDataTable and
7       QSqlForm
8

SYNOPSIS

10       #include <qsqleditorfactory.h>
11
12       Inherits QEditorFactory.
13
14   Public Members
15       QSqlEditorFactory ( QObject * parent = 0, const char * name = 0 )
16       ~QSqlEditorFactory ()
17       virtual QWidget * createEditor ( QWidget * parent, const QVariant &
18           variant )
19       virtual QWidget * createEditor ( QWidget * parent, const QSqlField *
20           field )
21
22   Static Public Members
23       QSqlEditorFactory * defaultFactory ()
24       void installDefaultFactory ( QSqlEditorFactory * factory )
25

DESCRIPTION

27       The QSqlEditorFactory class is used to create the editors used by
28       QDataTable and QSqlForm.
29
30       QSqlEditorFactory is used by QDataTable and QSqlForm to automatically
31       create appropriate editors for a given QSqlField. For example if the
32       field is a QVariant::String a QLineEdit would be the default editor,
33       whereas a QVariant::Int's default editor would be a QSpinBox.
34
35       If you want to create different editors for fields with the same data
36       type, subclass QSqlEditorFactory and reimplement the createEditor()
37       function.
38
39       See also QDataTable, QSqlForm, and Database Classes.
40

MEMBER FUNCTION DOCUMENTATION

QSqlEditorFactory::QSqlEditorFactory ( QObject * parent = 0, const char * name

43       = 0 )
44       Constructs a SQL editor factory with parent parent, called name.
45

QSqlEditorFactory::~QSqlEditorFactory ()

47       Destroys the object and frees any allocated resources.
48

QWidget * QSqlEditorFactory::createEditor ( QWidget * parent, const QVariant &

50       variant ) [virtual]
51       Creates and returns the appropriate editor widget for the QVariant
52       variant.
53
54       The widget that is returned has the parent parent (which may be zero).
55       If variant is invalid, 0 is returned.
56
57       Reimplemented from QEditorFactory.
58

QWidget * QSqlEditorFactory::createEditor ( QWidget * parent, const QSqlField

60       * field ) [virtual]
61       This is an overloaded member function, provided for convenience. It
62       behaves essentially like the above function.
63
64       Creates and returns the appropriate editor for the QSqlField field.
65

QSqlEditorFactory * QSqlEditorFactory::defaultFactory () [static]

67       Returns an instance of a default editor factory.
68

void QSqlEditorFactory::installDefaultFactory ( QSqlEditorFactory * factory )

70       [static]
71       Replaces the default editor factory with factory. All QDataTable and
72       QSqlForm instantiations will use this new factory for creating field
73       editors. QSqlEditorFactory takes ownership of &#92;a factory, and
74       destroys it when it is no longer needed.
75
76

SEE ALSO

78       http://doc.trolltech.com/qsqleditorfactory.html
79       http://www.trolltech.com/faq/tech.html
80
82       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
83       license file included in the distribution for a complete license
84       statement.
85

AUTHOR

87       Generated automatically from the source code.
88

BUGS

90       If you find a bug in Qt, please report it as described in
91       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
92       help you. Thank you.
93
94       The definitive Qt documentation is provided in HTML format; it is
95       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
96       web browser. This man page is provided as a convenience for those users
97       who prefer man pages, although this format is not officially supported
98       by Trolltech.
99
100       If you find errors in this manual page, please report them to qt-
101       bugs@trolltech.com.  Please include the name of the manual page
102       (qsqleditorfactory.3qt) and the Qt version (3.3.8).
103
104
105
106Trolltech AS                    2 February 2007         QSqlEditorFactory(3qt)
Impressum