Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Fonctions  · 

QSqlEditorFactory Class Reference
[sql module]

The QSqlEditorFactory class is used to create the editors used by QDataTable and QSqlForm. More...

#include <qsqleditorfactory.h>

Inherits QEditorFactory.

List of all member functions.

Public Members

Static Public Members


Detailed Description

The QSqlEditorFactory class is used to create the editors used by QDataTable and QSqlForm.

QSqlEditorFactory is used by QDataTable and QSqlForm to automatically create appropriate editors for a given QSqlField. For example if the field is a QVariant::String a QLineEdit would be the default editor, whereas a QVariant::Int's default editor would be a QSpinBox.

If you want to create different editors for fields with the same data type, subclass QSqlEditorFactory and reimplement the createEditor() function.

See also QDataTable, QSqlForm and Database Classes.


Member Function Documentation

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

Constructs a SQL editor factory with parent parent, called name.

QSqlEditorFactory::~QSqlEditorFactory ()

Destroys the object and frees any allocated resources.

QWidget * QSqlEditorFactory::createEditor ( QWidget * parent, const QVariant & variant ) [virtual]

Creates and returns the appropriate editor widget for the QVariant variant.

The widget that is returned has the parent parent (which may be zero). If variant is invalid, 0 is returned.

Reimplemented from QEditorFactory.

QWidget * QSqlEditorFactory::createEditor ( QWidget * parent, const QSqlField * field ) [virtual]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Creates and returns the appropriate editor for the QSqlField field.

QSqlEditorFactory * QSqlEditorFactory::defaultFactory () [static]

Returns an instance of a default editor factory.

void QSqlEditorFactory::installDefaultFactory ( QSqlEditorFactory * factory ) [static]

Replaces the default editor factory with factory. All QDataTable and QSqlForm instantiations will use this new factory for creating field editors. QSqlEditorFactory takes ownership of \a factory, and destroys it when it is no longer needed.

This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 3.0
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web