Hi! Can you post your index() method's realization, please? Right now I have issues with this. I try to pass COM object to createIndex() as ptr parameter, but Python interpreter just crashes. Here is my index() method:
@
def index(self, row, column, parent=QtCore.QModelIndex()):
if parent.isValid():
parent_item = parent.internalPointer()
try:
child = parent_item.ChildRows[row]
except:
return QtCore.QModelIndex()
else:
try:
child = self.card.Sections(self.card.Type.AllSections.
GetByAlias('Main').ID).Rows[row]
except:
return QtCore.QModelIndex()
return self.createIndex(row, column, child)@
self.card - is the COM object. I use win32com library for working with COM. Interpreter crashes when trying to execute this:
@return self.createIndex(row, column, child)@
Thanks!