Unable to fully remove border of PyQt QGraphicsView
问题 I have tried calling self.setStyleSheet("background: transparent; border: transparent;") on a QGraphicsView, but it still leaves a 1 pixel border on the top edge. I have also tried replacing border: transparent; with border-style: none; , but it didn't work either. Here is a screenshot of the problem: What command will fully remove the border from the QGraphicsView? 回答1: You can use one of the following css rule: graphicsView.setStyleSheet("border-width: 0px; border-style: solid") or