Quote Originally Posted by waynew View Post
Also, I don't see where you have populated your model with a model->select();
What select() method? It doesn't exist in QAbstractItemModel!

Quote Originally Posted by Lykurg View Post
But sharing a query with the model is a bad idea it will come to problems. Better just tell the model the database name and let the model do all the rest.
Why?

And I need different parts of the program to access different parts of the database, so isn't it necessary to share it?