Hello!

I've got code like this:

Qt Code:
  1. ok = bdb.open();
  2.  
  3. if (ok)
  4. {
  5. queryModel.clear();
  6. queryModel.setQuery("SELECT * FROM notifi WHERE complete='0'", bdb);
  7. queryModel.clear(); // <----- with this everything is OK
  8. bdb.close();
  9. }
To copy to clipboard, switch view to plain text mode 

Of course code is more complicated. In future I need to change QSqlQueryModel to QSqlQuery but still... as I mentioned in other thread - strange things happen when I close database before clearing QSqlQueryModel, so is there any way to save somehow results from that QSqlQueryModel (maybe in other object)? I don't want to leave database opened while I'm working with data that I've just read.

thanks in advance
best regards
Tomsz