Results 1 to 2 of 2

Thread: Lazy population of QAbstractModel

  1. #1
    Join Date
    Dec 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Lazy population of QAbstractModel

    I want to build a tree using a lazy method (each node will be retrieved using a slow db), how can I do that using QAbstractItemModel.
    Each node is uniquely identified by a String, that could be build from the parent string. I found a solution based on a QSet, each time I add an item I will add the unique string to the QSet and point the internalpointer of item to it but it is ugly and cleaning is not automagic. Do you have some idea or pointer

    Perhaps a proxymodel?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Lazy population of QAbstractModel

    J-P Nurmi

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.