Employee/Applicant GUI and DB
This commit is contained in:
@@ -105,7 +105,7 @@ class BusinessModel(QAbstractTableModel):
|
||||
def columnCount(self, parent= QModelIndex()):
|
||||
return len(self.__visible_columns) - 1
|
||||
|
||||
def data(self, index, role= Qt.DisplayRole):
|
||||
def data(self, index, role = Qt.DisplayRole):
|
||||
if role == Qt.DisplayRole:
|
||||
row = self.__data[index.row()]
|
||||
return row[index.column() + 1]
|
||||
@@ -132,6 +132,7 @@ class BusinessModel(QAbstractTableModel):
|
||||
|
||||
@Slot(int)
|
||||
def onRowClicked(self, row):
|
||||
#print(self.__data)
|
||||
#print(f"Selected table row: {row}, corresponding DB ID: {self.__data[row][0]}")
|
||||
if not self.__business_dict['business'] or self.__data[row][0] != self.__business_dict['business']['id']:
|
||||
self.__business = self.__business_dao.getOneBusiness(self.__data[row][0], self.__key)
|
||||
|
||||
Reference in New Issue
Block a user