MCPcopy
hub / github.com/PyQt5/PyQt / onItemChanged

Method onItemChanged

QTreeView/TestJsonModel.py:131–145  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

129 self.doExport()
130
131 def onItemChanged(self, item):
132 if self.sender() == self.model:
133 self.doExport()
134
135 if isinstance(item, QModelIndex):
136 item = self.model.itemFromIndex(item)
137
138 if not item:
139 return
140 keyInfo = ""
141 if item.keyItem:
142 keyInfo = f"row={item.keyItem.row()}, col={item.keyItem.column()}, text={item.keyItem.text()}"
143 print(
144 f"row={item.row()}, col={item.column()}, text={item.text()}, value={str(item.data(Qt.EditRole))}, key=({keyInfo})\n\trowCount={item.rowCount()}\n\tpath={item.path}"
145 )
146
147 def onFilterPathToggled(self, checked):
148 if checked:

Callers

nothing calls this directly

Calls 3

doExportMethod · 0.95
textMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected