37 Constructor |
37 Constructor |
38 |
38 |
39 @param sourceModel reference to the source model (QAbstractItemModel) |
39 @param sourceModel reference to the source model (QAbstractItemModel) |
40 @param parent reference to the parent object (QObject) |
40 @param parent reference to the parent object (QObject) |
41 """ |
41 """ |
42 super(HistoryMenuModel, self).__init__(parent) |
42 super().__init__(parent) |
43 |
43 |
44 self.__treeModel = sourceModel |
44 self.__treeModel = sourceModel |
45 |
45 |
46 self.setSourceModel(sourceModel) |
46 self.setSourceModel(sourceModel) |
47 |
47 |
235 Constructor |
235 Constructor |
236 |
236 |
237 @param sourceModel reference to the source model (QAbstractItemModel) |
237 @param sourceModel reference to the source model (QAbstractItemModel) |
238 @param parent reference to the parent object (QObject) |
238 @param parent reference to the parent object (QObject) |
239 """ |
239 """ |
240 super(HistoryMostVisitedMenuModel, self).__init__(parent) |
240 super().__init__(parent) |
241 |
241 |
242 self.setDynamicSortFilter(True) |
242 self.setDynamicSortFilter(True) |
243 self.setSourceModel(sourceModel) |
243 self.setSourceModel(sourceModel) |
244 |
244 |
245 def lessThan(self, left, right): |
245 def lessThan(self, left, right): |