robertogoberto
16th March 2009, 19:49
I don't have access to my code at the moment, but from memory it goes something like
class GLWidget(QGLWidget):
def __init__(self, parent=None):
QGLWidget.__init__(self, QGLFormat(QGL.SampleBuffers), parent)
self.connect(self, SIGNAL('clicked()'), self.test)
def test():
print "wee"
my main window is simply this widget, the problem is connect doesn't seem to have any effect -- it doesn't complain about anything, it just doesn't do anything. Not sure what the problem is. My understanding is QObject -> QWidget -> QGLWidget, since I inherit from QGLWidget I should be able to use self as the first parameter, am I wrong?
if you see any syntax errors / typos keep in mind I'm reproducing this from memory, everything executes error free. I can post the actual code when I have a chance.
class GLWidget(QGLWidget):
def __init__(self, parent=None):
QGLWidget.__init__(self, QGLFormat(QGL.SampleBuffers), parent)
self.connect(self, SIGNAL('clicked()'), self.test)
def test():
print "wee"
my main window is simply this widget, the problem is connect doesn't seem to have any effect -- it doesn't complain about anything, it just doesn't do anything. Not sure what the problem is. My understanding is QObject -> QWidget -> QGLWidget, since I inherit from QGLWidget I should be able to use self as the first parameter, am I wrong?
if you see any syntax errors / typos keep in mind I'm reproducing this from memory, everything executes error free. I can post the actual code when I have a chance.