PyQt5: specifying QSqlTableModel

Rich Shepard rshepard at appl-ecosys.com
Sat Jun 5 19:07:36 BST 2021


On Sat, 5 Jun 2021, Colin McPhail wrote:

> Now that the Sqlite database table is getting displayed for you I fear I
> am at the end of my ability to help since I've never used anything other
> than Sqlite databases.

Colin,

And I've used postgres much more than sqlite. :-)

> However, I do notice that the list of tables in your database has a column
> called 'Owner.' Do you think that in datasource.py you should use the
> version of open() that takes a username and password?

That's a thought. It should not matter since the database is on the same
server/workstation host as my login. Couldn't hurt to try.

The problem looks related to QPSQL since otherwise both files are the same.
I'll take it to StackOverflow if the change to open() doesn't fix the
problem.

Thanks again,

Rich


More information about the PyQt mailing list