mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Replace QStyleOptionItemV4 with QStyleOptionItem
This commit is contained in:
parent
9ed39c3d6a
commit
0a301507c8
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import sys
|
||||
|
||||
from PyQt5.Qt import (Qt, QApplication, QStyle, QIcon, QDoubleSpinBox, QStyleOptionViewItemV4,
|
||||
from PyQt5.Qt import (Qt, QApplication, QStyle, QIcon, QDoubleSpinBox, QStyleOptionViewItem,
|
||||
QVariant, QSpinBox, QStyledItemDelegate, QComboBox, QTextDocument, QSize,
|
||||
QAbstractTextDocumentLayout, QFont, QFontInfo, QDate, QDateTimeEdit, QDateTime)
|
||||
|
||||
@ -453,7 +453,7 @@ class CcBoolDelegate(QStyledItemDelegate): # {{{
|
||||
def updateEditorGeometry(self, editor, option, index):
|
||||
if editor is None:
|
||||
return
|
||||
opt = QStyleOptionViewItemV4(option)
|
||||
opt = QStyleOptionViewItem(option)
|
||||
self.initStyleOption(opt, index)
|
||||
opt.showDecorationSelected = True
|
||||
opt.decorationSize = QSize(0, 0) # We want the editor to cover the decoration
|
||||
|
Loading…
x
Reference in New Issue
Block a user