Quote Originally Posted by Tarko1976 View Post
Sorry jefftee, but, i don't understand, that's all my code.
I understand it's all your code, but if you wrote that code, you should understand my reply...

Add a
Qt Code:
  1. wlfQuery->finish();
To copy to clipboard, switch view to plain text mode 
before line 103. To see if that's the cause of your connection still in use, as well as fix the memory leak below...

You also allocate your connection and query objects on the heap ("new" keyword) but you don't free that memory anywhere, so you should just allocate them on the stack and they'll go out of scope at the end of your loadData() method or make them class variables where they can be used in other parts of your code if needed.