Why can't I access the elements of the container?
void func(QList<int> &&list)
{
//Error 'class QForeachContainer<QList<int>&&>' has no member named 'i' _container_.control && _container_.i != _container_.e;
foreach (int item, list)
{
qDebug()<<"+++ ";
}
}
QList::iterator allows you to iterate over a QList (or QQueue) and to modify the list item associated with the iterator. More info: https://doc.qt.io/qt-5/qlist-iterator.html#details