QSqlQuery query("SELECT * FROM mytable"); query.seek(3); // move result set cursor to the 4th recordIn the above example, the seek() function moves the cursor of the result set to the fourth record in the result set. The QSqlQuery class is part of the QtSql module in the Qt framework. When using QSqlQuery in your project, you will need to link against the QtSql library.