Finished adding a client, still the GUI need some retouches

This commit is contained in:
2024-12-11 17:16:37 +01:00
parent 9a8be0409a
commit e2fe0c89c0
5 changed files with 27 additions and 25 deletions

View File

@@ -1,9 +1,9 @@
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, QObject
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, QObject, Signal
from .ContactDAO import ContactDAO
import logging
import json
class ContactModel(QObject):
contactIdReady = Signal(int)
def __init__(self):
super().__init__()
#self.logger = logging.getLogger()
@@ -21,8 +21,8 @@ class ContactModel(QObject):
@Slot(dict)
def addContact(self, contact):
addC = ContactDAO()
j = json.dumps(contact)
a = addC.addContact(j)
return a
i = ContactDAO().addContact(contact)
self.contactIdReady.emit(i)