<div dir="ltr"><div dir="ltr">Il giorno mar 30 lug 2019 alle ore 10:17 Gottfried Müller <<a href="mailto:gottfried.mueller@gmx.de">gottfried.mueller@gmx.de</a>> ha scritto:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">in a simple test I want to sort the items in an ascending order using my <br>
own proxy. I expected a comparision of "itemLeft.text() < <br>
itemRight.text()". But I had to code "itemRight.text() < <br>
itemLeft.text()" getting the ascending order.<br></blockquote><div><br></div><div>If you print self.proxy.sortOrder() you'll find out that you're currently using a descending order, which is why you've to invert the comparison.</div><div>I suppose that's due to the default sortIndicatorOrder of the QTreeView header, which seems to be set to DescendingOrder if the indicator is not shown.</div><div>Just use self.sortByColumn(0, QtCore.Qt.AscendingOrder) and it will work.</div><div><br></div><div>Maurizio<br></div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div></div>