then show us how you use the function. And if you just want to query a value, you better use a single QSqlQuery and don't abuse a model for that.