QsqlQuery query; QString queryText("SELECT * FROM section"); query.exec(queryText); qDebug() << query.size(); //always -1 while (query.next()) qDebug() << query.value(0).toString(); //got 16 records
方法size()始终返回-1.请帮忙.谢谢.
int numberOfRows = 0; if(qry.last()) { numberOfRows = qry.at() + 1; qry.first(); qry.prevIoUs(); }