When drawing a rounded rectangle then applying it as the windows shape using
def resizeEvent(self, event):
pixmap
= QtGui.
QPixmap(self.
size()) pixmap.fill(QtCore.Qt.transparent)
painter.setBrush(QtCore.Qt.black)
painter.drawRoundedRect(pixmap.rect(), 8, 8)
painter.end()
self.setMask(pixmap.mask())
def resizeEvent(self, event):
pixmap = QtGui.QPixmap(self.size())
pixmap.fill(QtCore.Qt.transparent)
painter = QtGui.QPainter(pixmap)
painter.setBrush(QtCore.Qt.black)
painter.drawRoundedRect(pixmap.rect(), 8, 8)
painter.end()
self.setMask(pixmap.mask())
To copy to clipboard, switch view to plain text mode
It comes out very poor quality, and it seems that I should be using OPENGl or is there is a way to have it set to HighQualityAntialiasing
Bookmarks