The QSqlRelation class stores information about an SQL foreign key. More...
|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.
See also QSqlRelationalTableModel, QSqlRelationalDelegate, and Relational Table Model Example.
Member Function Documentation
Constructs an invalid QSqlRelation object.
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.
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.
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.
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.