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
|
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,
|
QVariant, QSpinBox, QStyledItemDelegate, QComboBox, QTextDocument, QSize,
|
||||||
QAbstractTextDocumentLayout, QFont, QFontInfo, QDate, QDateTimeEdit, QDateTime)
|
QAbstractTextDocumentLayout, QFont, QFontInfo, QDate, QDateTimeEdit, QDateTime)
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ class CcBoolDelegate(QStyledItemDelegate): # {{{
|
|||||||
def updateEditorGeometry(self, editor, option, index):
|
def updateEditorGeometry(self, editor, option, index):
|
||||||
if editor is None:
|
if editor is None:
|
||||||
return
|
return
|
||||||
opt = QStyleOptionViewItemV4(option)
|
opt = QStyleOptionViewItem(option)
|
||||||
self.initStyleOption(opt, index)
|
self.initStyleOption(opt, index)
|
||||||
opt.showDecorationSelected = True
|
opt.showDecorationSelected = True
|
||||||
opt.decorationSize = QSize(0, 0) # We want the editor to cover the decoration
|
opt.decorationSize = QSize(0, 0) # We want the editor to cover the decoration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user