Results 1 to 2 of 2

Thread: QtreeWidget Hierarchy Change

  1. #1
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QtreeWidget Hierarchy Change

    Can anyone suggest a super simple way to determine when the hierarchy in a vanilla QTreeWidget changes in Qt 4.6. This would typically be with a (non-programmatic) internal move of a QTreeWidgetItem by the user. In particular, I need to determine the new parent of a relocated QTreeWidgetItem.

    If possible, would like to avoid reimplementing parts of drag and drop.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtreeWidget Hierarchy Change

    Hi,

    I am currently not sure, but doesn't the move affect the underlaying model? If so you could use e.g. the signal QAbstractItemModel::rowsMoved() to get notified.

Similar Threads

  1. object hierarchy
    By Midek in forum Newbie
    Replies: 4
    Last Post: 10th May 2010, 11:28
  2. Replies: 7
    Last Post: 31st May 2009, 11:30
  3. Trying to change the background of a QTreeWidget
    By vycke in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 20:44
  4. Change forms with QTreeWidget
    By olli in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2008, 16:58
  5. Change column width in a QTreeWidget
    By mace in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2006, 12:19

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.