Quote:
2) The QSqlRelation* classes say they support foreign keys. If a database table has a column specified as a foreign key will QSqlRelationalTableModel "know" it automatically? Or will I still have to specifically use it's setRelation() method on all the columns manually? (I know SQLite doesn't enforce them but you can still specify them.)
You can only substitute a column which is a foreign key with some other column from the table which the key belongs to and you have to explicitely name the columns (there is an example how to use it in
Quote:
3) Did I do something wrong or does SQLite's ":memory:" database not support multiple threads? When I switched it to using a file, updates and selects from multiple threads began working without problems. (Yes, I made unique db connections for each thread)
If you use ":memory:" then the database is created only for that single connection, therefore if you create another connection (i.e. in a different thread) again passing ":memory:" as the database name, a new database will be created for the other connection - they won't share data.