我有以下代码:
QList<QTreeWidgetItem *> selectedItems = ui->treeWidget->selectedItems();
for(QList<QTreeWidgetItem>::iterator i = selectedItems.begin(); i != selectedItems.end(); i++){
qDebug() << i;
}
但是有一个错误:
conversion from 'QList<QTreeWidgetItem*>::iterator' to non-scalar type 'QList<QTreeWidgetItem>::iterator' requested