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

Phil Thompson phil at riverbankcomputing.com
Sat Mar 17 12:34:38 GMT 2018


On 15 Mar 2018, at 10:14 am, J Barchan <jnbarchan at gmail.com> wrote:
> 
> 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?

It should be fixed in tonight's snapshot.

Thanks,
Phil


More information about the PyQt mailing list