Helpviewer/History/HistoryModel.py

changeset 2081
b7ccd563eeb6
parent 1509
c0b5e693b0eb
child 2126
3744863a534e
equal deleted inserted replaced
2080:4b33165dd55b 2081:b7ccd563eeb6
5 5
6 """ 6 """
7 Module implementing the history model. 7 Module implementing the history model.
8 """ 8 """
9 9
10 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl 10 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl, qVersion
11 11
12 import Helpviewer.HelpWindow 12 import Helpviewer.HelpWindow
13 13
14 14
15 class HistoryModel(QAbstractTableModel): 15 class HistoryModel(QAbstractTableModel):
62 Public slot to handle the update of a history entry. 62 Public slot to handle the update of a history entry.
63 63
64 @param row row number of the updated entry (integer) 64 @param row row number of the updated entry (integer)
65 """ 65 """
66 idx = self.index(row, 0) 66 idx = self.index(row, 0)
67 self.dataChanged.emit(idx, idx) 67 if qVersion() >= "5.0.0":
68 self.dataChanged.emit(idx, idx, [])
69 else:
70 self.dataChanged.emit(idx, idx)
68 71
69 def headerData(self, section, orientation, role=Qt.DisplayRole): 72 def headerData(self, section, orientation, role=Qt.DisplayRole):
70 """ 73 """
71 Public method to get the header data. 74 Public method to get the header data.
72 75

eric ide

mercurial