PDA

View Full Version : i want to click on the header of a tree view to sort the data



adrian88888888
2nd September 2020, 22:38
hi!, i made a simple tree view:
https://i.imgur.com/svsG81p.png

but i want this on it(the arrow in the header):
https://i.imgur.com/6H4T6sl.png
how im supposed to add that?


i took the image from:
https://doc.qt.io/qt-5/qtwidgets-itemviews-dirview-example.html


i want to add one arrow on every column so i can sort the data

Added after 39 minutes:

solved: self.mi_arbol.setSortingEnabled(1)