本页内容

Qt SQL C++ Classes

为 SQL 数据库提供驱动程序层、SQL API 层和用户界面层。更多...

命名空间

QSql

包含Qt SQL 模块中使用的各类标识符

类

QSqlDatabase

处理与数据库的连接

QSqlDriver

用于访问特定 SQL 数据库的抽象基类

QSqlDriverCreator

提供特定驱动程序类型 SQL 驱动程序工厂的模板类

QSqlDriverCreatorBase

SQL 驱动程序工厂的基类

QSqlDriverPlugin

用于自定义 QSqlDriver 插件的抽象基类

QSqlError

SQL 数据库错误信息

QSqlField

操作 SQL 数据库表和视图中的字段

QSqlIndex

用于操作和描述数据库索引的函数

QSqlQuery

执行和操作 SQL 语句的手段

QSqlQueryModel

SQL 结果集的只读数据模型

QSqlRecord

封装数据库记录

QSqlRelation

存储有关 SQL 外键的信息

QSqlRelationalDelegate

用于显示和编辑来自 QSqlRelationalTableModel 的数据的委托

QSqlRelationalTableModel

支持外键的单个数据库表的可编辑数据模型

QSqlResult

用于访问特定 SQL 数据库数据的抽象接口

QSqlTableModel

用于单个数据库表的可编辑数据模型

详细说明

该 Qt SQL 页面包含有关如何使用该模块的信息。

© 2026 The Qt Company Ltd. 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. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.