[PyKDE] gears.py problems

Stephen Croll scroll at airmail.net
Wed Sep 11 10:59:01 BST 2002


I am having problems getting the example program

    PyQt-3.3.2/examples3/gears.py

to work.  When I run it, all I get is (an unchanging) window full of
garbage.  Hoping to get a clue, I instrumented the GearWidget class in
the gears.py file to print a message upon entry of every method and I
got the following:

    GearWidget.__init__()
    GearWidget.initializeGL()
    GearWidget.resizeGL()
    GearWidget.timerEvent()
    GearWidget.paintGL()
    GearWidget.timerEvent()
    GearWidget.paintGL()
    GearWidget.paintGL()
    GearWidget.timerEvent()
    GearWidget.paintGL()
    GearWidget.timerEvent()
    GearWidget.paintGL()
    GearWidget.timerEvent()
    ...
    ...


So it appears that the OpenGL commands are being executed, but they're
just not affecting the QGLWidget.  With a few small changes, I
modified the source further to use GLUT instead of PyQt and it
displays as expected.  Any ideas how I can get it to work with PyQt?

Relevant (?) information about my environment:

    Python-2.2.1
    PyOpenGL-2.0.0.44 (didn't build togl; the examples seem to work)
    qt-x11-free-3.0.5 (examples work, including the 3D ones)
    sip-3.3.2
    PyQt-3.3.2        (most of the examples work)
  
    Redhat Linux 7.3, 2.4.19 kernel
    XFree86 Version 4.2.0 (Red Hat Linux release: 4.2.0-8)

    'glxinfo -v' contains:

        OpenGL vendor string: NVIDIA Corporation
        OpenGL renderer string: GeForce3/PCI/SSE
        OpenGL version string: 1.3.1 NVIDIA 29.60

Please note that I am very new to Python and Qt and have limited
experience with OpenGL.

-- Steve Croll (scroll at airmail.net)




More information about the PyQt mailing list