Oscar jinxed

This commit is contained in:
2024-12-11 15:08:16 +01:00
parent 7c61b2a532
commit 9a8be0409a
6 changed files with 55 additions and 9 deletions

View File

@@ -1,8 +1,9 @@
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, QObject
from .ContactDAO import ContactDAO
import logging
import json
class ContactModel:
class ContactModel(QObject):
def __init__(self):
super().__init__()
#self.logger = logging.getLogger()
@@ -18,3 +19,10 @@ class ContactModel:
print(f"*** File: {__file__}, __getData()")
ContactDAO().getContacts()
@Slot(dict)
def addContact(self, contact):
addC = ContactDAO()
j = json.dumps(contact)
a = addC.addContact(j)
return a