for(int i = 0; i < listWidget->count(); ++i) { QString str = listwidget.item(i)->text(); //Do stuff! }