From: Agnibho Mondal Date: Thu, 12 Oct 2023 18:52:37 +0000 (+0530) Subject: Included date in index X-Git-Tag: v0.4~24 X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=2f92fdd4522bbea7789b196a44a73da7cb43f1da;p=medscript.git Included date in index --- diff --git a/index.py b/index.py index d14b1f6..0948ef7 100644 --- a/index.py +++ b/index.py @@ -99,11 +99,11 @@ class Index(QMainWindow): with ZipFile(file) as zf: with zf.open("prescription.json") as pf: pres=json.loads(pf.read()) - self.index.append([pres["id"], pres["name"], pres["age"], pres["sex"], file]) + self.index.append([pres["id"], pres["name"], pres["age"], pres["sex"], pres["date"], file]) def load(self): model=QStandardItemModel() - model.setHorizontalHeaderLabels(["ID", "Name", "Age", "Sex", "File"]) + model.setHorizontalHeaderLabels(["ID", "Name", "Age", "Sex", "Date", "File"]) for item in self.index: row=[] for i in item: