PySide.QtSql.QSqlRelation class stores information about an SQL foreign key.
PySide.QtSql.QSqlRelation is a helper class for PySide.QtSql.QSqlRelationalTableModel 。见 QSqlRelationalTableModel.setRelation() and QSqlRelationalTableModel.relation() 了解细节。
另请参阅
PySide.QtSql.QSqlRelationalTableModel PySide.QtSql.QSqlRelationalDelegate Relational Table Model Example
| 参数: |
|
|---|
Constructs an invalid PySide.QtSql.QSqlRelation 对象。
For such an object, the PySide.QtSql.QSqlRelation.tableName() , PySide.QtSql.QSqlRelation.indexColumn() ,和 PySide.QtSql.QSqlRelation.displayColumn() functions return an empty string.
构造 PySide.QtSql.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.
| 返回类型: | unicode |
|---|
Returns the column from table PySide.QtSql.QSqlRelation.tableName() that should be presented to the user instead of a foreign key.
| 返回类型: | unicode |
|---|
Returns the index column from table PySide.QtSql.QSqlRelation.tableName() to which a foreign key refers.
| 返回类型: | PySide.QtCore.bool |
|---|
返回 true 若 PySide.QtSql.QSqlRelation object is valid; otherwise returns false.
| 返回类型: | unicode |
|---|
Returns the name of the table to which a foreign key refers.