Ejemplo n.º 1
0
 def __init__(self, parent=None):
     QTreeWidget.__init__(self, parent)
     self.setHeaderHidden(True)
     self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
     self.delegate = ResultsDelegate(self)
     self.setItemDelegate(self.delegate)
     self.itemClicked.connect(self.item_activated)
     self.blank_icon = QIcon(I('blank.png'))
     self.not_found_icon = QIcon(I('dialog_warning.png'))
     self.currentItemChanged.connect(self.current_item_changed)
     self.section_font = QFont(self.font())
     self.section_font.setItalic(True)
     self.section_map = {}
     self.search_results = []
     self.item_map = {}
Ejemplo n.º 2
0
 def __init__(self, parent=None):
     QTreeWidget.__init__(self, parent)
     self.setHeaderHidden(True)
     self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
     self.delegate = ResultsDelegate(self)
     self.setItemDelegate(self.delegate)
     self.itemClicked.connect(self.item_activated)
     self.blank_icon = QIcon(I('blank.png'))
     self.not_found_icon = QIcon(I('dialog_warning.png'))
     self.currentItemChanged.connect(self.current_item_changed)
     self.section_font = QFont(self.font())
     self.section_font.setItalic(True)
     self.section_map = {}
     self.search_results = []
     self.item_map = {}
     self.gesture_manager = GestureManager(self)
     self.setVerticalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel)