Can you tell me which part is wrong?

The following codes work:

QVector<QVector<int> > test2D;

test2D.resize(10);
for(int i=0; i<10; ++i)
{
(test2D[i]).resize(5);
}

for(int i=0; i<10; ++i)
for(int j=0; j<5; ++j) test2D[i][j] = 3*i+j;