No, I would leave the QSqlQuery outside.
No, you should be able to keep more than one connection at any given time.
Now I need help fixing my function in my other class
You likely want to use the m_selectDataBase for this query, no?
This doesn't look at all what I assume you want.
This creates a new model instance in every loop iteration, adds one record and then destroys the model (when it goes out of scope).
Cheers,
_
Bookmarks