I open a file in a Qlistview, If the file changes, maybe a line removed or a line changes, I'd like it to show on the qlistview as well. How can I do this?
My qlistview is pretty standard as defined below. Basically what I'm asking for is a way to automatically refresh the qlistview while changes are detected somehow...
with open(filex, "r") as f:
for line in f:
self.item = QtGui.QStandardItem(line)
self.item.setCheckable(True)
self.item.setCheckState(QtCore.Qt.Unchecked)
self.model.appendRow(self.item)
self.list_view.setModel(self.model)