py310: more float->int goodness

This commit is contained in:
Kovid Goyal 2022-01-09 05:28:21 +05:30
parent 71246f3c2e
commit 67ad530492
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -250,7 +250,7 @@ class Delegate(QStyledItemDelegate):
if width and width != st.textWidth():
st.setTextWidth(width)
br = st.size()
return QSize(br.width() + self.MARGIN, br.height() + self.MARGIN)
return QSize(int(br.width() + self.MARGIN), int(br.height() + self.MARGIN))
def paint(self, painter, option, index):
QStyledItemDelegate.paint(self, painter, option, index)