def __init__(self, *args): QTreeView.__init__(self,*args) self._model = Matches([p for p in store_plugins()]) self.setModel(self._model) self.setIconSize(QSize(24, 24)) self.rt_delegate = RichTextDelegate(self) for i in self._model.HTML_COLS: self.setItemDelegateForColumn(i, self.rt_delegate) for i in range(self._model.columnCount()): self.resizeColumnToContents(i) self.model().sort(1, Qt.AscendingOrder) self.header().setSortIndicator(self.model().sort_col, self.model().sort_order)
def __init__(self, *args): QTreeView.__init__(self,*args) self._model = Matches([p for p in store_plugins()]) self.setModel(self._model) self.setIconSize(QSize(24, 24)) self.rt_delegate = RichTextDelegate(self) for i in self._model.HTML_COLS: self.setItemDelegateForColumn(i, self.rt_delegate) for i in xrange(self._model.columnCount()): self.resizeColumnToContents(i) self.model().sort(1, Qt.AscendingOrder) self.header().setSortIndicator(self.model().sort_col, self.model().sort_order)