The QSqlRelation class stores information about an SQL foreign key. More...
#include <QSqlRelation>
QSqlRelation () | |
QSqlRelation ( const QString & tableName, const QString & indexColumn, const QString & displayColumn ) | |
QString | displayColumn () const |
QString | indexColumn () const |
bool | isValid () const |
QString | tableName () const |
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.
Constructs an invalid QSqlRelation object.
For such an object, the tableName(), indexColumn(), and displayColumn() functions return an empty string.
See also isValid().
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().
Returns the column from table tableName() that should be presented to the user instead of a foreign key.
Returns the index column from table tableName() to which a foreign key refers.
Returns true if the QSqlRelation object is valid; otherwise returns false.
Returns the name of the table to which a foreign key refers.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.