Use the correct style when custom painintg the icon

This commit is contained in:
Kovid Goyal 2022-10-16 10:36:10 +05:30
parent 3ff4979673
commit 3beb835042
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -763,7 +763,7 @@ class CcBoolDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
self.nuke_option_data = True
super().paint(painter, option, index)
self.nuke_option_data = False
style = QApplication.style()
style = option.styleObject.style() if option.styleObject else QApplication.instance().style()
style.drawItemPixmap(painter, option.rect, Qt.AlignmentFlag.AlignCenter, icon)
# }}}