I know that setting the database name for a SQLite database means setting the path to the DB file. I set it like this:
db.setDatabaseName(\"DienstplanerDB.sqlite
It should be saved in the current directory. To obtain it, use QDir::currentDirectory().