I need to loop through QListWidget items to save each one of them in a .txt file

i have no problems with file manipulation all that i need is a way to loop through the list items.