Workaround bug in Qt that causes column header to not update when scrolling the view

This commit is contained in:
Kovid Goyal 2010-05-17 23:41:23 -06:00
parent e0e0093fe5
commit ff2fa666d4

View File

@ -142,6 +142,11 @@ class BooksView(QTableView): # {{{
sm.select(idx, sm.Select|sm.Rows)
self.selected_ids = []
def scrollContentsBy(self, dx, dy):
# Needed as Qt bug causes headerview to not always update when scrolling
QTableView.scrollContentsBy(self, dx, dy)
self.column_header.update()
def set_ondevice_column_visibility(self):
m = self._model
self.column_header.setSectionHidden(m.column_map.index('ondevice'),