I have some QSql related questions that I can't seem to find answered anywhere. Perhaps someone here can help out.

1) My database gets updated externally at a very fast rate. What is the proper/best way to update any QSql*Models when their table is changed externally? Since SQLite is embedded I was kinda hoping it would happen automatically but that doesn't seem to be the case. I guess I could just have a timer and manually loop over the sql table and update the model rows/colums? Or is there a more elegant way using some database triggers or something? Calling select() repeatedly will update the data but any model selections & editing gets wiped out. Does MySql have any features that might help in this area?

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.)

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)

Thanks in advance,

RobF