I dynamically add and remove items to a QListWidget based on user selections elsewhere in the application. Is there a signal that is emitted when items are added or removed to a QListWidget? The signals that I see in the documentation doesn't mention anything for Add or Remove. The rest of the signals are for when individual items are interacted with.
How can I be notified when an item is added to my QListWidget?
A very simple example:
from PyQt4.QtGui import *
import sys
app = QApplication(sys.argv)
listWidget = QListWidget()
for i in range(10):
item = QListWidgetItem("Item %i" % i)
listWidget.addItem(item)
# ^^^ This is what I want a signal on
listWidget.show()
sys.exit(app.exec_())
What signal can I utilize to capture that addItem
event?