Hi guys,
I started using pyqt a few weeks ago, I was not sure about where to but this question but as I'm a newbie here it is.
I have list, self.cards, that is [QListWidgetItem, string, QString]
in this function I just iter the elements of this list and populate my QListView (self.cardList).
Code:
def updateCardList(self): for card_ in self.cards: self.cardList.addItem(card_[0])
It works fine for this function:
but in this case:Code:
def selectEditionsF(self): self.cards=[] for sEdition in self.selectedEditions: for edition in self.listEditions: if sEdition == edition[0]: for card in edition[1].iter('card'): self.updateCardList() self.selectEditionsWindow.close()
When it enters the loop in updateCardList I receive this message: "underlying C/C++ object has been deleted"Code:
def refine(self, bool): tempcards = self.cards self.cards = [] for card in tempcards: if self.refineColor.isChecked(): if self.colorBlue.isChecked(): if self.getCardColor(card[0]) == "Blue": self.cards.append(card) self.updateCardList()
Debug I found that inside the function everything is Ok, the error appears just inside the loop.
Any Ideas?