为 SQL 数据库提供驱动程序层、SQL API 层及用户接口层。 更多...
QSql | 包含用于整个 Qt SQL 模块的杂项标识符 |
QSqlDatabase | 处理数据库连接 |
QSqlDriverCreator | Template class that provides a SQL driver factory for a specific driver type |
QSqlDriverCreatorBase | The base class for SQL driver factories |
QSqlDriver | Abstract base class for accessing specific SQL databases |
QSqlDriverPlugin | 用于自定义 QSqlDriver 插件的抽象基 |
QSqlError | SQL 数据库错误信息 |
QSqlField | 操纵 SQL 数据库表和视图中的字段 |
QSqlIndex | Functions to manipulate and describe database indexes |
QSqlQuery | 执行和操纵 SQL 语句的手段 |
QSqlRecord | 封装数据库记录 |
QSqlResult | Abstract interface for accessing data from specific SQL databases |
QSqlQueryModel | Read-only data model for SQL result sets |
QSqlRelationalDelegate | Delegate that is used to display and edit data from a QSqlRelationalTableModel |
QSqlRelation | Stores information about an SQL foreign key |
QSqlRelationalTableModel | Editable data model for a single database table, with foreign key support |
QSqlTableModel | Editable data model for a single database table |
要包括模块类定义,使用以下指令:
#include <QtSql>
要链接到模块,添加此行到
qmake
.pro
文件:
QT += sql
见 SQL 编程 指南,了解在应用程序中使用此模块的有关信息。