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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QSqlRelation Class Reference

The QSqlRelation class stores information about an SQL foreign key. More...

 #include <QSqlRelation>

Public Functions

QSqlRelation ()
QSqlRelation ( const QString & tableName, const QString & indexColumn, const QString & displayColumn )
QString displayColumn () const
QString indexColumn () const
bool isValid () const
QString tableName () const

Detailed Description

The QSqlRelation class stores information about an SQL foreign key.

QSqlRelation is a helper class for QSqlRelationalTableModel. See QSqlRelationalTableModel::setRelation() and QSqlRelationalTableModel::relation() for details.

See also QSqlRelationalTableModel, QSqlRelationalDelegate, and Relational Table Model Example.

Member Function Documentation

QSqlRelation::QSqlRelation ()

Constructs an invalid QSqlRelation object.

For such an object, the tableName(), indexColumn(), and displayColumn() functions return an empty string.

See also isValid().

QSqlRelation::QSqlRelation ( const QString & tableName, const QString & indexColumn, const QString & displayColumn )

Constructs a QSqlRelation object, where tableName is the SQL table name to which a foreign key refers, indexColumn is the foreign key, and displayColumn is the field that should be presented to the user.

See also tableName(), indexColumn(), and displayColumn().

QString QSqlRelation::displayColumn () const

Returns the column from table tableName() that should be presented to the user instead of a foreign key.

QString QSqlRelation::indexColumn () const

Returns the index column from table tableName() to which a foreign key refers.

bool QSqlRelation::isValid () const

Returns true if the QSqlRelation object is valid; otherwise returns false.

QString QSqlRelation::tableName () const

Returns the name of the table to which a foreign key refers.

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 4.8
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