[PyQt] Missing/incorrect overload for `QSqlQuery.exec()`?

J Barchan jnbarchan at gmail.com
Thu Mar 15 10:14:10 GMT 2018


Docs:

http://doc.qt.io/qt-5/qsqlquery.html#exec
http://doc.qt.io/qt-5/qsqlquery.html#exec-1

Python 3 PyQt5 QtSql.py:

def exec(self, p_str): # real signature unknown; restored from __doc__
    """ exec(self, str) -> bool """
    return False

def exec_(self, p_str=None): # real signature unknown; restored from
__doc__ with multiple overloads
    """
    exec_(self, str) -> bool
    exec_(self) -> bool
    """
    return False


​This means ​that you can only invoke the no-parameter
http://doc.qt.io/qt-5/qsqlquery.html#exec-1 via `exec_()` and not `exec()`,
which I didn't understand when trying to call it.

Is this required/intentional?

-- 
Kindest,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180315/2fe942aa/attachment.html>


More information about the PyQt mailing list