This morning I was working on my open source lyrics projection program, openlp.org, and I was struggling to work out how to remove an item from a QListWidget in PyQt4.
It's fairly simple in Qt4 and C++, you simply fetch the item, and then delete it using the C++ delete keyword:
QListWidgetItem item = ui->listWidget->currentItem(); delete item;
However, I couldn't figure out how to do it in Python. Initially I tried the del keyword, but that didn't work.