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

Method doModify

QTreeView/TestModelModify.py:102–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100 )
101
102 def doModify(self):
103 self.editText.clear()
104 path = self.editPath.text().strip()
105 value = self.editValue.text().strip()
106 if not path or not value:
107 return
108
109 try:
110 value = json.loads(value)
111 except Exception:
112 pass
113
114 ret = self.model.updateValue(path, value)
115 self.editText.setPlainText(f"change ret: {ret}")
116
117 def doExport(self):
118 self.editText.setPlainText(self.model.toJson(ensure_ascii=False, indent=4))

Callers

nothing calls this directly

Calls 3

clearMethod · 0.45
textMethod · 0.45
updateValueMethod · 0.45

Tested by

no test coverage detected