[QGIS-Developer] QSqlTableModel not working with PostgreSQL 12

David Erill daviderill79 at gmail.com
Wed Jun 17 09:17:11 PDT 2020


Hi,

I'm aware about other issues dealing with PostgreSQL12, like this one:
https://github.com/qgis/QGIS/issues/32321

But my project that uses Qt class *QSqlTableModel* to fill QTableView is
not working.
I can execute this code:
model = QSqlTableModel()
model.setTable(table_name)
model.select()

But when I check if model is valid with:
model.lastError().isValid()

model.lastError().text() returns me this message:
Unable to find table 'tablename'

Developing with QGIS 3.12 in Ubuntu Bionic

Any hints how could I solve this issue? Will Qt version updated in next
releases?

Also there is a reported bug in Qt:
https://bugreports.qt.io/browse/QTBUG-79033

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200617/b477b2e8/attachment.html>


More information about the QGIS-Developer mailing list