Results 1 to 7 of 7

Thread: QTreeView: expand(), expandAll(), setExpanded() not work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,342
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: QTreeView: expand(), expandAll(), setExpanded() not work

    expand() and expandAll() are slots. setExpanded() probably invokes one of these slots. It probably doesn't work because your code doesn't return to the Qt event loop so it can handle the calls to the slots. The fact that it doesn't happen until you "do some GUI action later" is a big clue.

    The trick is to change your app so it isn't compute bound - a major cause of GUI unresponsiveness.

  2. The following user says thank you to d_stranz for this useful post:

    jasonhxs (31st July 2014)

Similar Threads

  1. Replies: 2
    Last Post: 31st July 2013, 18:06
  2. QTreeView expand and collapse
    By Qiieha in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2012, 13:57
  3. QTreeView -- only expand active (clicked) row
    By mardi in forum Qt Programming
    Replies: 6
    Last Post: 5th September 2012, 10:41
  4. QTreeView: expandAll() and expandToDepth(int) not working
    By papillon in forum Qt Programming
    Replies: 2
    Last Post: 24th October 2011, 00:30
  5. QTreeView expand signals
    By Vidar Bøe in forum Qt Programming
    Replies: 2
    Last Post: 26th May 2008, 10:47

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
  •  
Qt is a trademark of The Qt Company.