Uploaded my example file. This loads the DB

This file will correctly load the database.

If it doesn't, the most likely culprit is that QT (make clean?) erased
the contents of the database file.

You can fix that by going into the /bin directory of QT, then into the
folder "build-<yourprojectname>-....." and replacing the .db3 file there
with one from this github (found in Source Code\Database and DBIO).