Finished adding a client, still the GUI need some retouches
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user