I want to make a menu option that takes the currently selected database and saves it (with any chages that have been made) to a different file. I don't want the changes to be saved to the original database.

I'm using a QTableView to show the contents of the database.

Is there an easy way to make a copy of the QSqlTableModel, including the data that has been changed, but not submitted to the database yet (without actually saving the data first)?

I could just use QFile::copy() to copy the database file to the new name, but I'd lose any changes that were made. If I submit the changes to the database first, then copy it, it kind of invalidates the idea of a "Save As" (your original file changes also).

I'm using Qt 4.2/4.3

Sincerely,

Gordon E.