Example #1
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     entry = index.data(Qt.UserRole)
     if entry is None:
         return ans
     th = self.parent().thumbnail_height
     width, height = min(th, entry.width), min(th, entry.height)
     m = self.MARGIN * 2
     return QSize(max(width + m, ans.width()), height + m + self.MARGIN + ans.height())
Example #2
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     entry = index.data(Qt.UserRole)
     if entry is None:
         return ans
     th = self.parent().thumbnail_height
     width, height = min(th, entry.width), min(th, entry.height)
     m = self.MARGIN * 2
     return QSize(max(width + m, ans.width()), height + m + self.MARGIN + ans.height())
Example #3
0
 def sizeHint(self, *args):
     ans = QStyledItemDelegate.sizeHint(self, *args)
     return ans + QSize(0, 10)
Example #4
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     ans.setHeight(ans.height() + 10)
     return ans
Example #5
0
 def sizeHint(self, *args):
     ans = QStyledItemDelegate.sizeHint(self, *args)
     ans.setHeight(ans.height() + 4)
     return ans
Example #6
0
 def sizeHint(self, option, index):
     option.font = self.rf
     option.textElideMode = self.em
     return QStyledItemDelegate.sizeHint(self, option, index)
Example #7
0
 def sizeHint(self, *args):
     ans = QStyledItemDelegate.sizeHint(self, *args)
     ans.setHeight(ans.height() + 4)
     return ans
Example #8
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     if not index.parent().isValid():
         ans += QSize(0, 6)
     return ans
Example #9
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     top_level = not index.parent().isValid()
     ans += QSize(0, 20 if top_level else 10)
     return ans
Example #10
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, index)
     if not index.parent().isValid():
         ans += QSize(0, 6)
     return ans
Example #11
0
File: ask.py Project: alok/vise
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, self._m.index(0))
     index.data(Qt.UserRole).adjust_size_hint(option, ans)
     return ans
Example #12
0
 def sizeHint(self, option, index):
     option.font = self.rf
     option.textElideMode = self.em
     return QStyledItemDelegate.sizeHint(self, option, index)
Example #13
0
 def sizeHint(self, *args):
     return QStyledItemDelegate.sizeHint(self, *args) + QSize(0, 15)
Example #14
0
 def sizeHint(self, *args):
     ans = QStyledItemDelegate.sizeHint(self, *args)
     return ans + QSize(0, 10)
Example #15
0
 def sizeHint(self, *args):
     return QStyledItemDelegate.sizeHint(self, *args) + QSize(0, 15)
Example #16
0
 def sizeHint(self, option, index):
     ans = QStyledItemDelegate.sizeHint(self, option, self._m.index(0))
     index.data(Qt.UserRole).adjust_size_hint(option, ans)
     return ans