Results 1 to 2 of 2

Thread: how can i delete all items under selected item in treeview

  1. #1
    Join Date
    May 2009
    Posts
    83

    Default how can i delete all items under selected item in treeview

    i have treeview as the view and QStandardItemModel as the model. now i each node in the model has child nodes . my question is how can i delete all the child nodes under selected item ? all i found is this but this is for one row . i need all the rows under item.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how can i delete all items under selected item in treeview

    Are you able to invent an algorithm that would do what you want provided you didn't have any magic wands that would do the job in one go? If so, then write down the algorithm and then try implementing it. If you have any specific problems with it, then ask here (after providing the algorithm).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. popupmenu for QTreeWidget's item when a particular item selected.
    By vinod sharma in forum Best Practices in Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 10:45
  2. Replies: 1
    Last Post: 20th January 2010, 08:38
  3. How to delete a node in treeview?
    By jasonjoy in forum Qt Programming
    Replies: 3
    Last Post: 10th November 2009, 06:07
  4. How to get parent of selected item in TreeView?
    By RavenS in forum Qt Programming
    Replies: 2
    Last Post: 7th March 2009, 13:27
  5. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

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.