QSqlDriverPlugin Class
The QSqlDriverPlugin class provides an abstract base for custom QSqlDriver plugins. More...
| Header: | #include <QSqlDriverPlugin> |
| qmake: | QT += sql |
| Inherits: | QObject |
Detailed Description
The SQL driver plugin is a simple plugin interface that makes it easy to create your own SQL driver plugins that can be loaded dynamically by Qt.
Writing a SQL plugin is achieved by subclassing this base class, reimplementing the pure virtual function create(), and exporting the class with the Q_PLUGIN_METADATA() macro. See the SQL plugins that come with Qt for example implementations (in the plugins/src/sqldrivers subdirectory of the source distribution).
The json file containing the metadata for the plugin contains a list of keys indicating the supported sql drivers
{ "Keys": [ "mysqldriver" ] }
See also How to Create Qt Plugins.