[PyQt] Troubleshooting QDataWidgetMapper.submit failure

alan moore me at alandmoore.com
Tue Feb 12 22:29:54 GMT 2019


On 2/12/19 2:29 AM, Barry wrote:
> Can you use the logs on the sql server?
> At least to postgesql i have had it log the queries it receives and errorsin the past.
>
> Barry
>
I was using SQLite in this case.  It turns out the error wasn't SQL at 
all, I had a select() call happening on the model after it was shown in 
the form, so the mapper's currentIndex() was reset to -1.  Once I 
eliminated that, things worked fine.

Situations like this highlight my one major gripe about Qt: the way it 
so often silently fails instead of throwing exceptions. Guess that's 
just a C++ thing?




More information about the PyQt mailing list