Попробуй
query.setForwardOnly(true);
void QSqlQuery::setForwardOnly ( bool forward )
Sets forward only mode to forward. If forward is true, only next() and seek() with positive values, are allowed for navigating the results.
Forward only mode can be (depending on the driver) more memory efficient since results do not need to be cached. It will also improve performance on some databases. For this to be true, you must call setForwardOnly() before the query is prepared or executed. Note that the constructor that takes a query and a database may execute the query.