QList< QList<int> > intList;
intList.at(0).append(5);
我这样用。。。编译时报这个错。。。
error: passing 'const QList<int>' as 'this' argument of 'void QList<T>::append(const T&) [with T = int]' discards qualifiers
求大神帮忙下!
------解决方案--------------------
这样就可以了:
typedef QList<int> IntList;
QList<IntList>
------解决方案--------------------
错误在于没分清:
intList.at(0)
intList[0]
二者的区别