[SOLVED] Subclass QAbstractTableModel to handle SQLite tables

First time posting so bare with me. I have already created QAbstractTableModel and QStyledItemDelegate classes and am getting better with model/view programming. I am working with PyQt4. How do I connect my custom model to handle SQLite tables now? I know there is QSqlTableModel, but I have already spent a considerable amount of time creating my own custom table model. How can I use my model with SQLite tables? Also how is the best way to reuse a model for different views? I have been creating a new model for every view which doesn't seem like the best approach. What do I need to add to support foreign key support to my custom table model? I want to be able to insert a record into a database table from my model and delete a record from the database. What other methods do I need?

Thank you SGaist for your help. I do have one more question. I want to have a table view on the left and a tableview on the right. My goal is to show all the rows of the database on the left tableview. On the right tableview I want to have a long form. Right now I achieve this goal by having two models. Ideally if they select a row in the left model it updates the form model on the right? Rather then use two models for this would you use QDataMapper for this? I want the user to be able to edit either place and have the information updated in the database.