I am new to python .
The QList widget contain the list of files in a directory ...I want to select the name of the file and store it in a variablle.....How can i do that?...
If you're trying to get the current item in the QListWidget, this is trivial:
text = '' cur = lw.currentItem() if cur is not None: text = cur.text()
You code will have to check that text is not empty before doing anything with it.