code: def sortByColumn(self, column, order=QtCore.Qt.AscendingOrder):
          
          super(XTreeWidget, self).sortByColumn(column, order)
          self._sortOrder = order
docs: Overloads the default sortByColumn to record the order for later \
          reference.
          
          :param      column | <int>
                      order  | <QtCore.Qt.SortOrder>