Results 1 to 2 of 2

Thread: HighQualityAntialiasing

  1. #1
    Join Date
    Jul 2011
    Posts
    16
    Qt products

    Default HighQualityAntialiasing

    When drawing a rounded rectangle then applying it as the windows shape using

    Qt Code:
    1. def resizeEvent(self, event):
    2. pixmap = QtGui.QPixmap(self.size())
    3. pixmap.fill(QtCore.Qt.transparent)
    4. painter = QtGui.QPainter(pixmap)
    5. painter.setBrush(QtCore.Qt.black)
    6. painter.drawRoundedRect(pixmap.rect(), 8, 8)
    7. painter.end()
    8.  
    9. 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

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: HighQualityAntialiasing

    You can set antialiasing modes in the painter. Check the documentation.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.