引用第3楼wxj120bw于2011-08-13 15:43发表的 回 2楼(yinrenjieone) 的帖子 :
看下qt的assistant帮助对这个函数的说明
Returns the size of the result (number of rows returned), or -1 if the size cannot be determined or if the database does not support reporting information about query sizes. Note that for non-SELECT statements (isSelect() returns false), size() will return -1. If the query is not active (isActive() returns false), -1 is returned.
To determine the number of rows affected by a non-SELECT statement, use numRowsAffected().
