[Interest] Enable sample buffers / samples on QGLWidget from Python
Elvis Stansvik
elvstone at gmail.com
Thu Jun 23 14:57:33 CEST 2016
Hi all,
Sorry if this is slightly off-topic.
I'm working with a QGLWidget-based widget. I know it's deprecated, but
I'm tied to it for the moment since I'm working with VTK (something
QOpenGLWidget-based will come eventually..).
I have a need to enable sample buffers and set the number of samples,
to enable anti-aliasing.
I thought I could do (self is the QGLWidget):
glFormat = self.format()
glFormat.setSampleBuffers(True)
glFormat.setSamples(8)
self.setFormat(glFormat)
But realize now that setFormat has been made obsolete in Qt 5, and
PyQt as a policy does not wrap obsolete stuff.
Am I screwed or is there some other way to do this?
Thanks for any help,
Elvis
More information about the Interest
mailing list