Print QSqlQuery::lastQuery() and try executing it with SQLite Browser. Maybe it gives a more detailed error message.