PDA

View Full Version : PySide uncorrect rowCount return



Sorath
14th June 2016, 16:05
hi,

I am using exactly this model:
http://www.petfactory.se/pyside-custom-hierarchal-data-model/

and I am trying:
#print self.parent().parent().parent().lightListerTree.mo del().rowCount( self.parent().parent().parent().lightListerTree.mo del().index(0, 0, 0) )
or
#print self.parent().parent().parent().lightListerTree.mo del().rowCount( None )

and I always get a return value of '1'.

anyone any idea why that is so, even though my QTreeView has a lot of items?

thanks.

anda_skoa
14th June 2016, 18:30
You are asking for the row count of the first top level entry in the tree.
Does that entry have children?

Cheers,
_