QList<QList<int> > myList;

This works fine, the problem should be somewhere else. Have you added the include?