def __lt__(self, other): sortColumn = self.treeWidget().sortColumn() if sortColumn == 1: lhs = int(self.text(1)) rhs = int(other.text(1)) return lhs < rhs return QTreeWidgetItem.__lt__(self, other)
def __lt__(self, other): if isinstance(other, FolderWidgetItem): return QTreeWidgetItem.__lt__(self, other) else: return True
def __lt__(self, other): if isinstance(other, ScriptWidgetItem): return QTreeWidgetItem.__lt__(self, other) else: return False