/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtSql.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlquerymodel.sip"
#include <qsqlquerymodel.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 275 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qhash.sip"
#include <qhash.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlerror.sip"
#include <qsqlerror.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlquery.sip"
#include <qsqlquery.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 37 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqldatabase.sip"
#include <qsqldatabase.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlrecord.sip"
#include <qsqlrecord.h>
#line 63 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 66 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmimedata.sip"
#include <qmimedata.h>
#line 69 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qdatastream.sip"
#include <qdatastream.h>
#line 81 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 76 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 87 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 90 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 442 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 93 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 96 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 99 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 102 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qmap.sip"
#include <qmap.h>
#line 105 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 110 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 113 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 116 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 119 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 122 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 125 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 128 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 131 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 134 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 137 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 140 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 143 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlQueryModel.cpp"


class sipQSqlQueryModel : public  ::QSqlQueryModel
{
public:
    sipQSqlQueryModel( ::QObject*);
    virtual ~sipQSqlQueryModel();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QModelIndex indexInQuery(const  ::QModelIndex&) const SIP_OVERRIDE;
    void queryChange() SIP_OVERRIDE;
    void clear() SIP_OVERRIDE;
    bool moveColumns(const  ::QModelIndex&,int,int,const  ::QModelIndex&,int) SIP_OVERRIDE;
    bool moveRows(const  ::QModelIndex&,int,int,const  ::QModelIndex&,int) SIP_OVERRIDE;
    bool canDropMimeData(const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&) const SIP_OVERRIDE;
    QHash<int, ::QByteArray> roleNames() const SIP_OVERRIDE;
     ::Qt::DropActions supportedDragActions() const SIP_OVERRIDE;
    void revert() SIP_OVERRIDE;
    bool submit() SIP_OVERRIDE;
     ::QSize span(const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndexList match(const  ::QModelIndex&,int,const  ::QVariant&,int, ::Qt::MatchFlags) const SIP_OVERRIDE;
     ::QModelIndex buddy(const  ::QModelIndex&) const SIP_OVERRIDE;
    void sort(int, ::Qt::SortOrder) SIP_OVERRIDE;
     ::Qt::ItemFlags flags(const  ::QModelIndex&) const SIP_OVERRIDE;
    bool canFetchMore(const  ::QModelIndex&) const SIP_OVERRIDE;
    void fetchMore(const  ::QModelIndex&) SIP_OVERRIDE;
    bool removeColumns(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool removeRows(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool insertColumns(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool insertRows(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
     ::Qt::DropActions supportedDropActions() const SIP_OVERRIDE;
    bool dropMimeData(const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&) SIP_OVERRIDE;
     ::QMimeData* mimeData(const  ::QModelIndexList&) const SIP_OVERRIDE;
     ::QStringList mimeTypes() const SIP_OVERRIDE;
    bool setItemData(const  ::QModelIndex&,const QMap<int, ::QVariant>&) SIP_OVERRIDE;
    QMap<int, ::QVariant> itemData(const  ::QModelIndex&) const SIP_OVERRIDE;
    bool setHeaderData(int, ::Qt::Orientation,const  ::QVariant&,int) SIP_OVERRIDE;
     ::QVariant headerData(int, ::Qt::Orientation,int) const SIP_OVERRIDE;
    bool setData(const  ::QModelIndex&,const  ::QVariant&,int) SIP_OVERRIDE;
     ::QVariant data(const  ::QModelIndex&,int) const SIP_OVERRIDE;
    int columnCount(const  ::QModelIndex&) const SIP_OVERRIDE;
    int rowCount(const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndex sibling(int,int,const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndex index(int,int,const  ::QModelIndex&) const SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSqlQueryModel(const sipQSqlQueryModel &);
    sipQSqlQueryModel &operator = (const sipQSqlQueryModel &);

    char sipPyMethods[42];
};

sipQSqlQueryModel::sipQSqlQueryModel( ::QObject*a0):  ::QSqlQueryModel(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSqlQueryModel::~sipQSqlQueryModel()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQSqlQueryModel::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtSql_qt_metaobject(sipPySelf,sipType_QSqlQueryModel);

    return  ::QSqlQueryModel::metaObject();
}

int sipQSqlQueryModel::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QSqlQueryModel::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtSql_qt_metacall(sipPySelf,sipType_QSqlQueryModel,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQSqlQueryModel::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtSql_qt_metacast(sipPySelf, sipType_QSqlQueryModel, _clname, &sipCpp) ? sipCpp :  ::QSqlQueryModel::qt_metacast(_clname));
}

 ::QModelIndex sipQSqlQueryModel::indexInQuery(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_indexInQuery);

    if (!sipMeth)
        return  ::QSqlQueryModel::indexInQuery(a0);

    extern  ::QModelIndex sipVH_QtSql_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_25(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::queryChange()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_queryChange);

    if (!sipMeth)
    {
         ::QSqlQueryModel::queryChange();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtSql_16(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipQSqlQueryModel::clear()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_clear);

    if (!sipMeth)
    {
         ::QSqlQueryModel::clear();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtSql_16(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSqlQueryModel::moveColumns(const  ::QModelIndex& a0,int a1,int a2,const  ::QModelIndex& a3,int a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_moveColumns);

    if (!sipMeth)
        return  ::QSqlQueryModel::moveColumns(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_44(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,int,const  ::QModelIndex&,int);

    return sipVH_QtSql_44(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

bool sipQSqlQueryModel::moveRows(const  ::QModelIndex& a0,int a1,int a2,const  ::QModelIndex& a3,int a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_moveRows);

    if (!sipMeth)
        return  ::QSqlQueryModel::moveRows(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_44(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,int,const  ::QModelIndex&,int);

    return sipVH_QtSql_44(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

bool sipQSqlQueryModel::canDropMimeData(const  ::QMimeData*a0, ::Qt::DropAction a1,int a2,int a3,const  ::QModelIndex& a4) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[5]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_canDropMimeData);

    if (!sipMeth)
        return  ::QSqlQueryModel::canDropMimeData(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&);

    return sipVH_QtSql_35(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

QHash<int, ::QByteArray> sipQSqlQueryModel::roleNames() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[6]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_roleNames);

    if (!sipMeth)
        return  ::QSqlQueryModel::roleNames();

    extern QHash<int, ::QByteArray> sipVH_QtSql_43(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_43(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::Qt::DropActions sipQSqlQueryModel::supportedDragActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[7]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_supportedDragActions);

    if (!sipMeth)
        return  ::QSqlQueryModel::supportedDragActions();

    extern  ::Qt::DropActions sipVH_QtSql_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_36(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipQSqlQueryModel::revert()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_revert);

    if (!sipMeth)
    {
         ::QSqlQueryModel::revert();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtSql_16(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSqlQueryModel::submit()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[9], &sipPySelf, SIP_NULLPTR, sipName_submit);

    if (!sipMeth)
        return  ::QSqlQueryModel::submit();

    extern bool sipVH_QtSql_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_7(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::QSize sipQSqlQueryModel::span(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[10]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_span);

    if (!sipMeth)
        return  ::QSqlQueryModel::span(a0);

    extern  ::QSize sipVH_QtSql_42(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_42(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QModelIndexList sipQSqlQueryModel::match(const  ::QModelIndex& a0,int a1,const  ::QVariant& a2,int a3, ::Qt::MatchFlags a4) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[11]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_match);

    if (!sipMeth)
        return  ::QSqlQueryModel::match(a0,a1,a2,a3,a4);

    extern  ::QModelIndexList sipVH_QtSql_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,const  ::QVariant&,int, ::Qt::MatchFlags);

    return sipVH_QtSql_41(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

 ::QModelIndex sipQSqlQueryModel::buddy(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[12]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_buddy);

    if (!sipMeth)
        return  ::QSqlQueryModel::buddy(a0);

    extern  ::QModelIndex sipVH_QtSql_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_25(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::sort(int a0, ::Qt::SortOrder a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[13], &sipPySelf, SIP_NULLPTR, sipName_sort);

    if (!sipMeth)
    {
         ::QSqlQueryModel::sort(a0,a1);
        return;
    }

    extern void sipVH_QtSql_40(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::SortOrder);

    sipVH_QtSql_40(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

 ::Qt::ItemFlags sipQSqlQueryModel::flags(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[14]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_flags);

    if (!sipMeth)
        return  ::QSqlQueryModel::flags(a0);

    extern  ::Qt::ItemFlags sipVH_QtSql_39(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_39(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSqlQueryModel::canFetchMore(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[15]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_canFetchMore);

    if (!sipMeth)
        return  ::QSqlQueryModel::canFetchMore(a0);

    extern bool sipVH_QtSql_27(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_27(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::fetchMore(const  ::QModelIndex& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[16], &sipPySelf, SIP_NULLPTR, sipName_fetchMore);

    if (!sipMeth)
    {
         ::QSqlQueryModel::fetchMore(a0);
        return;
    }

    extern void sipVH_QtSql_38(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    sipVH_QtSql_38(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSqlQueryModel::removeColumns(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[17], &sipPySelf, SIP_NULLPTR, sipName_removeColumns);

    if (!sipMeth)
        return  ::QSqlQueryModel::removeColumns(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_37(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

bool sipQSqlQueryModel::removeRows(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[18], &sipPySelf, SIP_NULLPTR, sipName_removeRows);

    if (!sipMeth)
        return  ::QSqlQueryModel::removeRows(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_37(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

bool sipQSqlQueryModel::insertColumns(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[19], &sipPySelf, SIP_NULLPTR, sipName_insertColumns);

    if (!sipMeth)
        return  ::QSqlQueryModel::insertColumns(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_37(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

bool sipQSqlQueryModel::insertRows(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[20], &sipPySelf, SIP_NULLPTR, sipName_insertRows);

    if (!sipMeth)
        return  ::QSqlQueryModel::insertRows(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_37(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

 ::Qt::DropActions sipQSqlQueryModel::supportedDropActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[21]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_supportedDropActions);

    if (!sipMeth)
        return  ::QSqlQueryModel::supportedDropActions();

    extern  ::Qt::DropActions sipVH_QtSql_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_36(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSqlQueryModel::dropMimeData(const  ::QMimeData*a0, ::Qt::DropAction a1,int a2,int a3,const  ::QModelIndex& a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[22], &sipPySelf, SIP_NULLPTR, sipName_dropMimeData);

    if (!sipMeth)
        return  ::QSqlQueryModel::dropMimeData(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&);

    return sipVH_QtSql_35(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

 ::QMimeData* sipQSqlQueryModel::mimeData(const  ::QModelIndexList& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[23]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_mimeData);

    if (!sipMeth)
        return  ::QSqlQueryModel::mimeData(a0);

    extern  ::QMimeData* sipVH_QtSql_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndexList&);

    return sipVH_QtSql_34(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QStringList sipQSqlQueryModel::mimeTypes() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[24]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_mimeTypes);

    if (!sipMeth)
        return  ::QSqlQueryModel::mimeTypes();

    extern  ::QStringList sipVH_QtSql_22(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_22(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSqlQueryModel::setItemData(const  ::QModelIndex& a0,const QMap<int, ::QVariant>& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[25], &sipPySelf, SIP_NULLPTR, sipName_setItemData);

    if (!sipMeth)
        return  ::QSqlQueryModel::setItemData(a0,a1);

    extern bool sipVH_QtSql_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,const QMap<int, ::QVariant>&);

    return sipVH_QtSql_33(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

QMap<int, ::QVariant> sipQSqlQueryModel::itemData(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[26]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_itemData);

    if (!sipMeth)
        return  ::QSqlQueryModel::itemData(a0);

    extern QMap<int, ::QVariant> sipVH_QtSql_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_32(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSqlQueryModel::setHeaderData(int a0, ::Qt::Orientation a1,const  ::QVariant& a2,int a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[27], &sipPySelf, SIP_NULLPTR, sipName_setHeaderData);

    if (!sipMeth)
        return  ::QSqlQueryModel::setHeaderData(a0,a1,a2,a3);

    extern bool sipVH_QtSql_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::Orientation,const  ::QVariant&,int);

    return sipVH_QtSql_31(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

 ::QVariant sipQSqlQueryModel::headerData(int a0, ::Qt::Orientation a1,int a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[28]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_headerData);

    if (!sipMeth)
        return  ::QSqlQueryModel::headerData(a0,a1,a2);

    extern  ::QVariant sipVH_QtSql_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::Orientation,int);

    return sipVH_QtSql_30(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

bool sipQSqlQueryModel::setData(const  ::QModelIndex& a0,const  ::QVariant& a1,int a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[29], &sipPySelf, SIP_NULLPTR, sipName_setData);

    if (!sipMeth)
        return  ::QSqlQueryModel::setData(a0,a1,a2);

    extern bool sipVH_QtSql_29(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,const  ::QVariant&,int);

    return sipVH_QtSql_29(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

 ::QVariant sipQSqlQueryModel::data(const  ::QModelIndex& a0,int a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[30]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_data);

    if (!sipMeth)
        return  ::QSqlQueryModel::data(a0,a1);

    extern  ::QVariant sipVH_QtSql_28(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int);

    return sipVH_QtSql_28(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

int sipQSqlQueryModel::columnCount(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[31]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_columnCount);

    if (!sipMeth)
        return  ::QSqlQueryModel::columnCount(a0);

    extern int sipVH_QtSql_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_26(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

int sipQSqlQueryModel::rowCount(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[32]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_rowCount);

    if (!sipMeth)
        return  ::QSqlQueryModel::rowCount(a0);

    extern int sipVH_QtSql_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

    return sipVH_QtSql_26(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QModelIndex sipQSqlQueryModel::sibling(int a0,int a1,const  ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[33]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_sibling);

    if (!sipMeth)
        return  ::QSqlQueryModel::sibling(a0,a1,a2);

    extern  ::QModelIndex sipVH_QtSql_24(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_24(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

 ::QModelIndex sipQSqlQueryModel::index(int a0,int a1,const  ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[34]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_index);

    if (!sipMeth)
        return  ::QSqlQueryModel::index(a0,a1,a2);

    extern  ::QModelIndex sipVH_QtSql_24(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

    return sipVH_QtSql_24(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

bool sipQSqlQueryModel::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[35], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QSqlQueryModel::event(a0);

    extern bool sipVH_QtSql_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtSql_6(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSqlQueryModel::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[36], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QSqlQueryModel::eventFilter(a0,a1);

    extern bool sipVH_QtSql_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtSql_5(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQSqlQueryModel::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[37], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QSqlQueryModel::timerEvent(a0);
        return;
    }

    extern void sipVH_QtSql_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtSql_4(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[38], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QSqlQueryModel::childEvent(a0);
        return;
    }

    extern void sipVH_QtSql_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtSql_3(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[39], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QSqlQueryModel::customEvent(a0);
        return;
    }

    extern void sipVH_QtSql_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtSql_2(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[40], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QSqlQueryModel::connectNotify(a0);
        return;
    }

    extern void sipVH_QtSql_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtSql_1(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlQueryModel::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[41], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QSqlQueryModel::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtSql_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtSql_1(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QSqlQueryModel_rowCount, "rowCount(self, parent: QModelIndex = QModelIndex()) -> int");

extern "C" {static PyObject *meth_QSqlQueryModel_rowCount(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_rowCount(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex& a0def = QModelIndex();
        const  ::QModelIndex* a0 = &a0def;
        const  ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0))
        {
            int sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::rowCount(*a0) : sipCpp->rowCount(*a0));

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_rowCount, doc_QSqlQueryModel_rowCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_columnCount, "columnCount(self, parent: QModelIndex = QModelIndex()) -> int");

extern "C" {static PyObject *meth_QSqlQueryModel_columnCount(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_columnCount(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex& a0def = QModelIndex();
        const  ::QModelIndex* a0 = &a0def;
        const  ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0))
        {
            int sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::columnCount(*a0) : sipCpp->columnCount(*a0));

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_columnCount, doc_QSqlQueryModel_columnCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_record, "record(self, int) -> QSqlRecord\n"
"record(self) -> QSqlRecord");

extern "C" {static PyObject *meth_QSqlQueryModel_record(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_record(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlQueryModel, &sipCpp, &a0))
        {
             ::QSqlRecord*sipRes;

            sipRes = new  ::QSqlRecord(sipCpp->record(a0));

            return sipConvertFromNewType(sipRes,sipType_QSqlRecord,SIP_NULLPTR);
        }
    }

    {
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
             ::QSqlRecord*sipRes;

            sipRes = new  ::QSqlRecord(sipCpp->record());

            return sipConvertFromNewType(sipRes,sipType_QSqlRecord,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_record, doc_QSqlQueryModel_record);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_data, "data(self, QModelIndex, role: int = Qt.DisplayRole) -> Any");

extern "C" {static PyObject *meth_QSqlQueryModel_data(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_data(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex* a0;
        int a1 = Qt::DisplayRole;
        const  ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_role,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|i", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0, &a1))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant((sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::data(*a0,a1) : sipCpp->data(*a0,a1)));

            return sipConvertFromNewType(sipRes,sipType_QVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_data, doc_QSqlQueryModel_data);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_headerData, "headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) -> Any");

extern "C" {static PyObject *meth_QSqlQueryModel_headerData(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_headerData(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
         ::Qt::Orientation a1;
        int a2 = Qt::DisplayRole;
        const  ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_role,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiE|i", &sipSelf, sipType_QSqlQueryModel, &sipCpp, &a0, sipType_Qt_Orientation, &a1, &a2))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant((sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::headerData(a0,a1,a2) : sipCpp->headerData(a0,a1,a2)));

            return sipConvertFromNewType(sipRes,sipType_QVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_headerData, doc_QSqlQueryModel_headerData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_setHeaderData, "setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) -> bool");

extern "C" {static PyObject *meth_QSqlQueryModel_setHeaderData(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_setHeaderData(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
         ::Qt::Orientation a1;
        const  ::QVariant* a2;
        int a2State = 0;
        int a3 = Qt::EditRole;
         ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_role,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiEJ1|i", &sipSelf, sipType_QSqlQueryModel, &sipCpp, &a0, sipType_Qt_Orientation, &a1, sipType_QVariant, &a2, &a2State, &a3))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::setHeaderData(a0,a1,*a2,a3) : sipCpp->setHeaderData(a0,a1,*a2,a3));
            sipReleaseType(const_cast< ::QVariant *>(a2), sipType_QVariant, a2State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_setHeaderData, doc_QSqlQueryModel_setHeaderData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_insertColumns, "insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool");

extern "C" {static PyObject *meth_QSqlQueryModel_insertColumns(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_insertColumns(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
        int a1;
        const  ::QModelIndex& a2def = QModelIndex();
        const  ::QModelIndex* a2 = &a2def;
         ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, &a0, &a1, sipType_QModelIndex, &a2))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::insertColumns(a0,a1,*a2) : sipCpp->insertColumns(a0,a1,*a2));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_insertColumns, doc_QSqlQueryModel_insertColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_removeColumns, "removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool");

extern "C" {static PyObject *meth_QSqlQueryModel_removeColumns(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_removeColumns(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
        int a1;
        const  ::QModelIndex& a2def = QModelIndex();
        const  ::QModelIndex* a2 = &a2def;
         ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, &a0, &a1, sipType_QModelIndex, &a2))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::removeColumns(a0,a1,*a2) : sipCpp->removeColumns(a0,a1,*a2));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_removeColumns, doc_QSqlQueryModel_removeColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_setQuery, "setQuery(self, QSqlQuery)\n"
"setQuery(self, str, db: QSqlDatabase = QSqlDatabase())");

extern "C" {static PyObject *meth_QSqlQueryModel_setQuery(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_setQuery(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSqlQuery* a0;
         ::QSqlQueryModel *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QSqlQuery, &a0))
        {
            sipCpp->setQuery(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QSqlDatabase& a1def = QSqlDatabase();
        const  ::QSqlDatabase* a1 = &a1def;
         ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_db,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QString, &a0, &a0State, sipType_QSqlDatabase, &a1))
        {
            sipCpp->setQuery(*a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_setQuery, doc_QSqlQueryModel_setQuery);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_query, "query(self) -> QSqlQuery");

extern "C" {static PyObject *meth_QSqlQueryModel_query(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_query(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
             ::QSqlQuery*sipRes;

            sipRes = new  ::QSqlQuery(sipCpp->query());

            return sipConvertFromNewType(sipRes,sipType_QSqlQuery,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_query, doc_QSqlQueryModel_query);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_clear, "clear(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_clear(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_clear(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::clear() : sipCpp->clear());

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_clear, doc_QSqlQueryModel_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_lastError, "lastError(self) -> QSqlError");

extern "C" {static PyObject *meth_QSqlQueryModel_lastError(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_lastError(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
             ::QSqlError*sipRes;

            sipRes = new  ::QSqlError(sipCpp->lastError());

            return sipConvertFromNewType(sipRes,sipType_QSqlError,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_lastError, doc_QSqlQueryModel_lastError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_fetchMore, "fetchMore(self, parent: QModelIndex = QModelIndex())");

extern "C" {static PyObject *meth_QSqlQueryModel_fetchMore(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_fetchMore(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex& a0def = QModelIndex();
        const  ::QModelIndex* a0 = &a0def;
         ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::fetchMore(*a0) : sipCpp->fetchMore(*a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_fetchMore, doc_QSqlQueryModel_fetchMore);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_canFetchMore, "canFetchMore(self, parent: QModelIndex = QModelIndex()) -> bool");

extern "C" {static PyObject *meth_QSqlQueryModel_canFetchMore(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_canFetchMore(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex& a0def = QModelIndex();
        const  ::QModelIndex* a0 = &a0def;
        const  ::QSqlQueryModel *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::canFetchMore(*a0) : sipCpp->canFetchMore(*a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_canFetchMore, doc_QSqlQueryModel_canFetchMore);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_queryChange, "queryChange(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_queryChange(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_queryChange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::queryChange() : sipCpp->queryChange());

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_queryChange, doc_QSqlQueryModel_queryChange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_indexInQuery, "indexInQuery(self, QModelIndex) -> QModelIndex");

extern "C" {static PyObject *meth_QSqlQueryModel_indexInQuery(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_indexInQuery(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QModelIndex* a0;
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0))
        {
             ::QModelIndex*sipRes;

            sipRes = new  ::QModelIndex((sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::indexInQuery(*a0) : sipCpp->indexInQuery(*a0)));

            return sipConvertFromNewType(sipRes,sipType_QModelIndex,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_indexInQuery, doc_QSqlQueryModel_indexInQuery);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_setLastError, "setLastError(self, QSqlError)");

extern "C" {static PyObject *meth_QSqlQueryModel_setLastError(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_setLastError(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSqlError* a0;
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QSqlError, &a0))
        {
            sipCpp->setLastError(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_setLastError, doc_QSqlQueryModel_setLastError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_beginResetModel, "beginResetModel(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_beginResetModel(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_beginResetModel(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->beginResetModel();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_beginResetModel, doc_QSqlQueryModel_beginResetModel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_endResetModel, "endResetModel(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_endResetModel(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_endResetModel(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->endResetModel();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_endResetModel, doc_QSqlQueryModel_endResetModel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_beginInsertRows, "beginInsertRows(self, QModelIndex, int, int)");

extern "C" {static PyObject *meth_QSqlQueryModel_beginInsertRows(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_beginInsertRows(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QModelIndex* a0;
        int a1;
        int a2;
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9ii", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0, &a1, &a2))
        {
            sipCpp->beginInsertRows(*a0,a1,a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_beginInsertRows, doc_QSqlQueryModel_beginInsertRows);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_endInsertRows, "endInsertRows(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_endInsertRows(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_endInsertRows(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->endInsertRows();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_endInsertRows, doc_QSqlQueryModel_endInsertRows);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_beginRemoveRows, "beginRemoveRows(self, QModelIndex, int, int)");

extern "C" {static PyObject *meth_QSqlQueryModel_beginRemoveRows(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_beginRemoveRows(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QModelIndex* a0;
        int a1;
        int a2;
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9ii", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0, &a1, &a2))
        {
            sipCpp->beginRemoveRows(*a0,a1,a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_beginRemoveRows, doc_QSqlQueryModel_beginRemoveRows);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_endRemoveRows, "endRemoveRows(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_endRemoveRows(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_endRemoveRows(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->endRemoveRows();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_endRemoveRows, doc_QSqlQueryModel_endRemoveRows);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_beginInsertColumns, "beginInsertColumns(self, QModelIndex, int, int)");

extern "C" {static PyObject *meth_QSqlQueryModel_beginInsertColumns(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_beginInsertColumns(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QModelIndex* a0;
        int a1;
        int a2;
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9ii", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0, &a1, &a2))
        {
            sipCpp->beginInsertColumns(*a0,a1,a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_beginInsertColumns, doc_QSqlQueryModel_beginInsertColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_endInsertColumns, "endInsertColumns(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_endInsertColumns(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_endInsertColumns(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->endInsertColumns();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_endInsertColumns, doc_QSqlQueryModel_endInsertColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_beginRemoveColumns, "beginRemoveColumns(self, QModelIndex, int, int)");

extern "C" {static PyObject *meth_QSqlQueryModel_beginRemoveColumns(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_beginRemoveColumns(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QModelIndex* a0;
        int a1;
        int a2;
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9ii", &sipSelf, sipType_QSqlQueryModel, &sipCpp, sipType_QModelIndex, &a0, &a1, &a2))
        {
            sipCpp->beginRemoveColumns(*a0,a1,a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_beginRemoveColumns, doc_QSqlQueryModel_beginRemoveColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_endRemoveColumns, "endRemoveColumns(self)");

extern "C" {static PyObject *meth_QSqlQueryModel_endRemoveColumns(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_endRemoveColumns(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            sipCpp->endRemoveColumns();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_endRemoveColumns, doc_QSqlQueryModel_endRemoveColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQueryModel_roleNames, "roleNames(self) -> Dict[int, QByteArray]");

extern "C" {static PyObject *meth_QSqlQueryModel_roleNames(PyObject *, PyObject *);}
static PyObject *meth_QSqlQueryModel_roleNames(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QSqlQueryModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQueryModel, &sipCpp))
        {
            QHash<int, ::QByteArray>*sipRes;

            sipRes = new QHash<int, ::QByteArray>((sipSelfWasArg ? sipCpp-> ::QSqlQueryModel::roleNames() : sipCpp->roleNames()));

            return sipConvertFromNewType(sipRes,sipType_QHash_1800_0100QByteArray,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQueryModel, sipName_roleNames, doc_QSqlQueryModel_roleNames);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSqlQueryModel(void *, const sipTypeDef *);}
static void *cast_QSqlQueryModel(void *sipCppV, const sipTypeDef *targetType)
{
     ::QSqlQueryModel *sipCpp = reinterpret_cast< ::QSqlQueryModel *>(sipCppV);

    if (targetType == sipType_QSqlQueryModel)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QAbstractTableModel)->ctd_cast(static_cast< ::QAbstractTableModel *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSqlQueryModel(void *, int);}
static void release_QSqlQueryModel(void *sipCppV, int)
{
     ::QSqlQueryModel *sipCpp = reinterpret_cast< ::QSqlQueryModel *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void *array_QSqlQueryModel(Py_ssize_t);}
static void *array_QSqlQueryModel(Py_ssize_t sipNrElem)
{
    return new  ::QSqlQueryModel[sipNrElem];
}


extern "C" {static void array_delete_QSqlQueryModel(void *);}
static void array_delete_QSqlQueryModel(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSqlQueryModel *>(sipCpp);
}


extern "C" {static void dealloc_QSqlQueryModel(sipSimpleWrapper *);}
static void dealloc_QSqlQueryModel(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSqlQueryModel *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSqlQueryModel(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QSqlQueryModel(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSqlQueryModel(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQSqlQueryModel *sipCpp = SIP_NULLPTR;

    {
         ::QObject* a0 = 0;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQSqlQueryModel(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSqlQueryModel[] = {{1, 0, 1}};


static PyMethodDef methods_QSqlQueryModel[] = {
    {sipName_beginInsertColumns, meth_QSqlQueryModel_beginInsertColumns, METH_VARARGS, doc_QSqlQueryModel_beginInsertColumns},
    {sipName_beginInsertRows, meth_QSqlQueryModel_beginInsertRows, METH_VARARGS, doc_QSqlQueryModel_beginInsertRows},
    {sipName_beginRemoveColumns, meth_QSqlQueryModel_beginRemoveColumns, METH_VARARGS, doc_QSqlQueryModel_beginRemoveColumns},
    {sipName_beginRemoveRows, meth_QSqlQueryModel_beginRemoveRows, METH_VARARGS, doc_QSqlQueryModel_beginRemoveRows},
    {sipName_beginResetModel, meth_QSqlQueryModel_beginResetModel, METH_VARARGS, doc_QSqlQueryModel_beginResetModel},
    {sipName_canFetchMore, SIP_MLMETH_CAST(meth_QSqlQueryModel_canFetchMore), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_canFetchMore},
    {sipName_clear, meth_QSqlQueryModel_clear, METH_VARARGS, doc_QSqlQueryModel_clear},
    {sipName_columnCount, SIP_MLMETH_CAST(meth_QSqlQueryModel_columnCount), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_columnCount},
    {sipName_data, SIP_MLMETH_CAST(meth_QSqlQueryModel_data), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_data},
    {sipName_endInsertColumns, meth_QSqlQueryModel_endInsertColumns, METH_VARARGS, doc_QSqlQueryModel_endInsertColumns},
    {sipName_endInsertRows, meth_QSqlQueryModel_endInsertRows, METH_VARARGS, doc_QSqlQueryModel_endInsertRows},
    {sipName_endRemoveColumns, meth_QSqlQueryModel_endRemoveColumns, METH_VARARGS, doc_QSqlQueryModel_endRemoveColumns},
    {sipName_endRemoveRows, meth_QSqlQueryModel_endRemoveRows, METH_VARARGS, doc_QSqlQueryModel_endRemoveRows},
    {sipName_endResetModel, meth_QSqlQueryModel_endResetModel, METH_VARARGS, doc_QSqlQueryModel_endResetModel},
    {sipName_fetchMore, SIP_MLMETH_CAST(meth_QSqlQueryModel_fetchMore), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_fetchMore},
    {sipName_headerData, SIP_MLMETH_CAST(meth_QSqlQueryModel_headerData), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_headerData},
    {sipName_indexInQuery, meth_QSqlQueryModel_indexInQuery, METH_VARARGS, doc_QSqlQueryModel_indexInQuery},
    {sipName_insertColumns, SIP_MLMETH_CAST(meth_QSqlQueryModel_insertColumns), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_insertColumns},
    {sipName_lastError, meth_QSqlQueryModel_lastError, METH_VARARGS, doc_QSqlQueryModel_lastError},
    {sipName_query, meth_QSqlQueryModel_query, METH_VARARGS, doc_QSqlQueryModel_query},
    {sipName_queryChange, meth_QSqlQueryModel_queryChange, METH_VARARGS, doc_QSqlQueryModel_queryChange},
    {sipName_record, meth_QSqlQueryModel_record, METH_VARARGS, doc_QSqlQueryModel_record},
    {sipName_removeColumns, SIP_MLMETH_CAST(meth_QSqlQueryModel_removeColumns), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_removeColumns},
    {sipName_roleNames, meth_QSqlQueryModel_roleNames, METH_VARARGS, doc_QSqlQueryModel_roleNames},
    {sipName_rowCount, SIP_MLMETH_CAST(meth_QSqlQueryModel_rowCount), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_rowCount},
    {sipName_setHeaderData, SIP_MLMETH_CAST(meth_QSqlQueryModel_setHeaderData), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_setHeaderData},
    {sipName_setLastError, meth_QSqlQueryModel_setLastError, METH_VARARGS, doc_QSqlQueryModel_setLastError},
    {sipName_setQuery, SIP_MLMETH_CAST(meth_QSqlQueryModel_setQuery), METH_VARARGS|METH_KEYWORDS, doc_QSqlQueryModel_setQuery}
};

PyDoc_STRVAR(doc_QSqlQueryModel, "\1QSqlQueryModel(parent: QObject = None)");


static pyqt5ClassPluginDef plugin_QSqlQueryModel = {
    & ::QSqlQueryModel::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSql_QSqlQueryModel = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlQueryModel,
        SIP_NULLPTR,
        &plugin_QSqlQueryModel
    },
    {
        sipNameNr_QSqlQueryModel,
        {0, 0, 1},
        28, methods_QSqlQueryModel,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlQueryModel,
    -1,
    -1,
    supers_QSqlQueryModel,
    SIP_NULLPTR,
    init_type_QSqlQueryModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlQueryModel,
    SIP_NULLPTR,
    array_QSqlQueryModel,
    SIP_NULLPTR,
    release_QSqlQueryModel,
    cast_QSqlQueryModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlQueryModel,
    sizeof ( ::QSqlQueryModel),
};
