I have added a QSpinBox to a QGraphicsScene using a QGraphicsProxyWidget. Each time I hover over the QSpinBox, it flickers with a black band overlaid on the spinbox controls. I have attached a screenshot and the code below. Am I doing something wrong? Is there a way to avoid this? Pyside 1.1.2, Python 2.7, Windows7.
class testWidget(QGraphicsView):
def __init__(self):
QGraphicsView.__init__(self)
floorSpinBox = QSpinBox()
floorSpinBox.setGeometry(0,0,50,25)
proxyWidget = QGraphicsProxyWidget()
proxyWidget.setWidget(floorSpinBox)
scene = QGraphicsScene(self)
scene.addItem(proxyWidget)
self.setScene(scene)
if __name__ == "__main__":
app = QApplication(sys.argv)
widget = testWidget()
widget.show()
app.exec_()
EDIT
Apparently there is a bug report filed here: Bugreport. I had to finally add the QSpinBox
to a regular QWidget
and not under QGraphicsView
.