width = 1024
height = 768
def testing(self):
print "working"
def __init__(self, width, height, parent=None):
self.connect(self, SIGNAL('clicked()'), self.testing)
self.width = width
self.height = height
class GLWidget(QGLWidget):
width = 1024
height = 768
def testing(self):
print "working"
def __init__(self, width, height, parent=None):
QGLWidget.__init__(self, QGLFormat(QGL.SampleBuffers), parent)
self.connect(self, SIGNAL('clicked()'), self.testing)
self.width = width
self.height = height
To copy to clipboard, switch view to plain text mode
test = GLWidget(1024,768)
test.show()
sys.exit(app.exec_())
app = QApplication(sys.argv)
test = GLWidget(1024,768)
test.show()
sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode
There is actual (relevant) code. Runs, displays, no errors, but no connect.
Bookmarks