IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QSqlRelation Class

The QSqlRelation class stores information about an SQL foreign key.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QSqlRelation Class

  • Header: QSqlRelation

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Sql)

    target_link_libraries(mytarget PRIVATE Qt6::Sql)

  • qmake: QT += sql

Detailed Description

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

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

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.

void QSqlRelation::swap(QSqlRelation &other)

Swaps this with other.

QString QSqlRelation::tableName() const

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+