1QEditorFactory(3qt)                                        QEditorFactory(3qt)
2
3
4

NAME

6       QEditorFactory - Used to create editor widgets for QVariant data types
7

SYNOPSIS

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

DESCRIPTION

25       The QEditorFactory class is used to create editor widgets for QVariant
26       data types.
27
28       Each editor factory provides the createEditor() function which given a
29       QVariant will create and return a QWidget that can edit that QVariant.
30       For example if you have a QVariant::String type, a QLineEdit would be
31       the default editor returned, whereas a QVariant::Int's default editor
32       would be a QSpinBox.
33
34       If you want to create different editors for fields with the same data
35       type, subclass QEditorFactory and reimplement the createEditor()
36       function.
37
38       See also Database Classes.
39

MEMBER FUNCTION DOCUMENTATION

QEditorFactory::QEditorFactory ( QObject * parent = 0, const char * name = 0 )

42
43       Constructs an editor factory with parent parent, called name.
44

QEditorFactory::~QEditorFactory ()

46       Destroys the object and frees any allocated resources.
47

QWidget * QEditorFactory::createEditor ( QWidget * parent, const QVariant & v

49       ) [virtual]
50       Creates and returns the appropriate editor for the QVariant v. If the
51       QVariant is invalid, 0 is returned. The parent is passed to the
52       appropriate editor's constructor.
53
54       Reimplemented in QSqlEditorFactory.
55

QEditorFactory * QEditorFactory::defaultFactory () [static]

57       Returns an instance of a default editor factory.
58

void QEditorFactory::installDefaultFactory ( QEditorFactory * factory )

60       [static]
61       Replaces the default editor factory with factory.  QEditorFactory takes
62       ownership of factory, and destroys it when it is no longer needed.
63
64

SEE ALSO

66       http://doc.trolltech.com/qeditorfactory.html
67       http://www.trolltech.com/faq/tech.html
68
70       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
71       license file included in the distribution for a complete license
72       statement.
73

AUTHOR

75       Generated automatically from the source code.
76

BUGS

78       If you find a bug in Qt, please report it as described in
79       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
80       help you. Thank you.
81
82       The definitive Qt documentation is provided in HTML format; it is
83       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
84       web browser. This man page is provided as a convenience for those users
85       who prefer man pages, although this format is not officially supported
86       by Trolltech.
87
88       If you find errors in this manual page, please report them to qt-
89       bugs@trolltech.com.  Please include the name of the manual page
90       (qeditorfactory.3qt) and the Qt version (3.3.8).
91
92
93
94Trolltech AS                    2 February 2007            QEditorFactory(3qt)
Impressum