GraphicsView: Set a trnasparent background palette

This commit is contained in:
Dennis Goeries 2020-09-26 14:36:43 +02:00
parent 9fdaffaf7d
commit 9a51fc3662

View File

@ -130,6 +130,11 @@ class GraphicsView(QtGui.QGraphicsView):
self.scaleCenter = False ## should scaling center around view center (True) or mouse click (False)
self.clickAccepted = False
# Set a transparent background QPalette!
palette = self.palette()
palette.setColor(QtGui.QPalette.Background, QtCore.Qt.transparent)
self.setPalette(palette)
def setAntialiasing(self, aa):
"""Enable or disable default antialiasing.
Note that this will only affect items that do not specify their own antialiasing options."""