I can confirm that at least with Qt 4.x size() did always return -1 for sqlite databases. You cannot rely on it.