Results 1 to 4 of 4

Thread: List and load childs as new parent

  1. #1
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default List and load childs as new parent

    what is need to achieve to load item children's as new content of list when using QAbstractlistModel and Qml ? I would like that when user clicks item which is folder type its load its content as new content.


    One option is also create Breadcrumb type functionality but is there any examples for that ?

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

    Default Re: List and load childs as new parent

    One option is to use a DelegateModel on top of the actual tree model and set the rootIndex
    http://doc.qt.io/qt-5/qml-qtqml-mode...rootIndex-prop

    Cheers,
    _

  3. #3
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: List and load childs as new parent

    Can it used with TableView ? Or is ListView better ?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: List and load childs as new parent

    Should works with both.
    Both of them treat the model as a list model.

    So it is just a matter how you want the view to look and behave.

    Cheers,
    _

Similar Threads

  1. load list
    By maarvi in forum Newbie
    Replies: 3
    Last Post: 24th May 2011, 09:01
  2. NOT zooming childs after parent zoom.
    By alitoh in forum Qt Programming
    Replies: 5
    Last Post: 19th April 2011, 16:27
  3. Replies: 1
    Last Post: 30th March 2011, 16:29
  4. Drag & Drop when parent and childs accept drops?
    By gri in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 10:00
  5. how to get a list of QGraphicsItems with no parent?
    By mooreaa in forum Qt Programming
    Replies: 6
    Last Post: 30th July 2008, 11:36

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.