Reputation: 5460
I'm trying to subclass QStyledItemDelegate
to remove the focus rectangle in a QComboBox
.
Even though I'm calling the base implementation of the paint function and nothing else, the result is very different. It looks as if only the parts of the style-sheet that influence the bounding box of the item are taken into consideration.
class PStyledItemDelegate(QStyledItemDelegate):
def __init__(self, *args, **kwds):
super(PStyledItemDelegate, self).__init__(*args, **kwds)
def paint(self, *args, **kwargs):
QStyledItemDelegate.paint(*args, **kwargs)
What do I have to do to get it to paint exactly as a unmodified QStyledItemDelegate
?
Upvotes: 0
Views: 293
Reputation: 5460
As suggested I tried replacing PySide with PyQt4 and now it works, so it appears to be a bug. I also update PySide from 1.1.2 to 1.2.1 but the result is the same.
Unfortunately the switch breaks other parts of my code, but if there are no other suggestions I'm going to accept this as answer.
EDIT The Bug is tracked here
Upvotes: 1