Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
5.13.1
-
None
-
ArchLinux, PyQt5 5.13.1
Description
I don't know if this is a duplicate of QTBUG-79033 or not, but setTable() comes first:
model = QtSql.QSqlTableModel()
db = model.database()
logging.debug("Data base tables: %s", db.tables()) # <-- correct answer
model.setTable("****") # <-- name is contained in the list from db.tables()
logging.debug("Message by model.setTable: %s",
model.lastError().text()) # <-- error, see below
Result of running this:
DEBUG:root:Data base tables: ['t_manip', 't_spiel', 't_stamm', 't_ewtab', 't_pps', 't_tab']
DEBUG:root:Message by model.setTable: Unable to find table t_ewtab
This is Python with PyQt5, not C++ with Qt, but I don't think that makes a difference.
Attachments
Issue Links
- duplicates
-
QTBUG-79033 QSqlTableModel::select() fails with PostgreSQL 12.0, pg_attrdef.adsrc does not exist
- Closed