Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsqldriverplugin.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSQLDRIVERPLUGIN_H
6#define QSQLDRIVERPLUGIN_H
7
8#include <QtSql/qtsqlglobal.h>
9#include <QtCore/qplugin.h>
10#include <QtCore/qfactoryinterface.h>
11
12QT_BEGIN_NAMESPACE
13
14
15class QSqlDriver;
16
17#define QSqlDriverFactoryInterface_iid "org.qt-project.Qt.QSqlDriverFactoryInterface"
18
19class Q_SQL_EXPORT QSqlDriverPlugin : public QObject
20{
21 Q_OBJECT
22public:
23 explicit QSqlDriverPlugin(QObject *parent = nullptr);
24 ~QSqlDriverPlugin();
25
26 virtual QSqlDriver *create(const QString &key) = 0;
27
28};
29
30QT_END_NAMESPACE
31
32#endif // QSQLDRIVERPLUGIN_H
QSqlDriver * create(const QString &)
Creates and returns a QSqlDriver object for the driver called key.
Definition main.cpp:29
The QSqlDriverPlugin class provides an abstract base for custom QSqlDriver plugins.