QVariant QSqlQuery::value ( int index ) const
Returns the value of field index in the current record.
The fields are numbered from left to right using the text of the SELECT statement, e.g. in
SELECT forename, surname FROM people;
field 0 is forename and field 1 is surname. Using SELECT * is not recommended because the order of the fields in the query is undefined.
An invalid QVariant is returned if field index does not exist, if the query is inactive, or if the query is positioned on an invalid record.
See also previous(), next(), first(), last(), seek(), isActive(), and isValid().
Bookmarks