Exemplo n.º 1
0
 def getRec(self):
     self.ui.listWidget.clear()
     currentChef = self.ui.recipeList.currentItem()
     fname = currentChef.data(16)
     lname = currentChef.data(17)
     name = (fname, lname)
     recipes = DatabaseManage.getRecByChefName(name[0])
     for recipe in recipes:
         temp = QtWidgets.QListWidgetItem(recipe[0], self.ui.listWidget)
Exemplo n.º 2
0
	def setChefRec(self):
		recipes = DatabaseManage.getRecByChefName(self.name)
		for recipe in recipes:
			temp = QtWidgets.QListWidgetItem(recipe[0], self.ui.recipeList)
			temp.setData(16,recipe)
		self.ui.recipeList.sortItems()