Results 1 to 20 of 20

Thread: The dataChanged Signal Not Performing as Expected

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,324
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: The dataChanged Signal Not Performing as Expected

    Actually, it's top left and bottom right, inclusive. From the docs:

    If the items are of the same parent, the affected ones are those between topLeft and bottomRight inclusive.
    This implies that if only one item is changed, the topLeft and bottomRight indexes should be the same. But for a tree view, this is important:

    If the items do not have the same parent, the behavior is undefined.
    This implies that if multiple items in the tree are changing at the same time, then you would need to emit multiple dataChanged() signals if the items come from different parts of the tree.

    Top left and bottom right also implies that the items changing are contiguous between those two limits.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

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

    Corny (29th January 2019)

Similar Threads

  1. QTableView switching currentIndex not performing as expected
    By AlphaWolfXV in forum Qt Programming
    Replies: 6
    Last Post: 31st December 2013, 14:22
  2. Get indices of rows where the signal dataChanged() was emitted
    By yannwilfried in forum Qt Programming
    Replies: 6
    Last Post: 8th August 2013, 09:19
  3. emitDataChanged and dataChanged signal
    By fruzzo in forum Qt Programming
    Replies: 1
    Last Post: 26th September 2012, 15:47
  4. Why the signal "dataChanged" by QTableWidget not work?
    By Tao Clark in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2011, 17:16
  5. QDir entryList performing slowly
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 8th October 2009, 16:21

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