There is also a no-parameter qend() which return a special end_query_iterator which may be compared with arbitrary iterator returned by qbegin() to check if the query has ended. But since it has different type it can't be used in STL algorithms like std::copy().