コード例 #1
0
ファイル: results_view.py プロジェクト: j-howell/calibre
    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)
コード例 #2
0
    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)