<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: Candara;color: #000000"><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px"><p style="color: #AAAAAA; margin-top: 10px;">On 5/7/2019 12:21:24 PM, Kyle Altendorf <sda@fstab.net> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">Is this really all you do when you sort?
<br>
<br>     # Sort children
<br>     def sort_children(self):
<br>         self.children.sort(key=lambda x: x.desc())
<br>         return
<br>
<br>Yes, that would upset Qt very much.  You would need to do a series of 
<br>moves or a restructure or...  I'm forgetting the terms offhand.  But 
<br>yes, you have to tell Qt when stuff moves around.  This would be part of 
<br>why it's useful to let an entirely stock Qt object like a proxy take 
<br>care of it for you.
<br>
<br>Cheers,
<br>-kyle
</div></blockquote><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998">Problem solved, I think (haven't seen any issues or crashes in testing so far).</span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="font-size: 12pt;color: rgb(0, 0, 0)"><span style="color: rgb(59, 89, 152);">It seems you were right, Kyle -- a proxy was the way to go.  It took me some mucking around to eventually grok <span style="font-family: Courier New">QSortFilterProxyModel</span> well enough to hook it into my app.  Once I did, that seems to do the trick.</span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998">Thanks again for all the help Kyle and Florian!  Learning all the time ...</span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="color: #3b5998">The modified file that seems to work is attached, in case anyone else was following.</span></div><div><span style="color: #3b5998"><br></span></div><div><span style="color: #3b5998">/John </span></div></div>