[PyQt] QGLWidget c++ widget works, SIP binding doesn't
jknox at irobot.com
Tue Apr 20 20:56:16 BST 2010
I've got a simple custom QGLWidget that works fine when loaded from c++.
(basically the Sierpinski demo)
I've built a SIP binding against it, that I can load from python but it
only ever displays a black area and it appears that the event loop never
My SIP file is trivial:
%Module MyGLTest 0
class MyGLWidget : QGLWidget
MyGLWidget(QWidget* parent /TransferThis/ = 0, const QGLWidget*
shareWidget = 0, Qt::WindowFlags f = 0);
My Python script to show it is also trivial (essentially equivalent to
the C++ code to do the same):
from PyQt4 import QtGui
from MyGLTest import MyGLWidget
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
# test the simple GL widget
myGLWidget = MyGLWidget()
This just launches a Qt window with an all black widget area.
So, given that the C++ widget works, what could I be missing that's
prevent the SIP binding from running properly?
I'm still new at this, so any ideas appreciated!
More information about the PyQt