Why do you put a spinbox in a QGraphicsScene ? This seems rather strange. If you donβt have any mysterious reason for this, but just want to use a functional, non-blurring user interface element, try making your testWidget QDialog instead of QGraphicsView .
from PyQt4.QtGui import QDialog, QSpinBox,QApplication import sys class testWidget(QDialog): def __init__(self): QDialog.__init__(self) self.setGeometry(200,200,200,100) floorSpinBox = QSpinBox(self) floorSpinBox.setGeometry(75,40,50,25) if __name__ == "__main__": app = QApplication(sys.argv) widget = testWidget() widget.show() app.exec_()
source share