Hi everyone,

I am working on a music player and one thing I have been struggling with is QSql database. Right now I have my main library database with primary key ID. I want to drag and drop songs to my playlist which is currently a :memory: database. The information is exactly the same except the primary key of the playlist is playlist_ID. Currently I am copying all the the records from the library to the playlist. This is okay when not to much is being moved, but if you want to load the whole library (e.g. shuffle mode) hangs for longer than I like.

I am wondering if it is possible to do a full inner join (I would use a table in the library database instead then) such that my playlist table only contains

playlist_ID, ID

and the rest like title, artist, album, etc... are filled in by the join. The goal is to only have to copy over the ID's during drag events instead of all 35 or so fields per record. I looked into using QSqlQuery model a but I want to be able to edit the fields from the playlist and it seems like there must be a better solution than just recreating QSqlTableDatabase.

Thanks!