Results 1 to 2 of 2

Thread: PySide uncorrect rowCount return

  1. #1
    Join Date
    Jul 2015
    Posts
    8
    Qt products
    Platforms
    Windows

    Default PySide uncorrect rowCount return

    hi,

    I am using exactly this model:
    http://www.petfactory.se/pyside-cust...al-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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: PySide uncorrect rowCount return

    You are asking for the row count of the first top level entry in the tree.
    Does that entry have children?

    Cheers,
    _

Similar Threads

  1. Replies: 7
    Last Post: 25th August 2015, 08:39
  2. Replies: 3
    Last Post: 19th June 2014, 14:59
  3. QSqlQueryModel ‘s method rowcount() return 256
    By liuqin820222 in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2013, 10:16
  4. rowCount and model
    By steg90 in forum Newbie
    Replies: 3
    Last Post: 11th May 2007, 10:14

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.