[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] /Transfer/ annotation not respected?
From: Giovanni Bajo <rasky () develer ! com>
Date: 2009-07-27 16:33:03
Message-ID: 4A6DD6BF.8080808 () develer ! com
[Download RAW message or body]
Hi Phil,
Using sip 4.8.2-snapshot, PyQt 4.5.2:
========================================
import sip
from PyQt4.Qt import *
class W(QGLWidget):
def __init__(self, parent=None):
format = QGLFormat()
ctx = QGLContext(format, None)
sip.dump(ctx)
QGLWidget.__init__(self, ctx, parent)
sip.dump(ctx)
self.makeCurrent()
#self.ctx = ctx
app = QApplication([])
x = W()
assert QGLContext.currentContext() is not None
========================================
<PyQt4.QtOpenGL.QGLContext object at 0x00BA1E68>
Reference count: 2
Address of wrapped object: 00C8CCD8
To be destroyed by: Python
Derived class?: yes
<PyQt4.QtOpenGL.QGLContext object at 0x00BA1E68>
Reference count: 2
Address of wrapped object: 00C8CCD8
To be destroyed by: Python
Derived class?: yes
Traceback (most recent call last):
File "pyqtbug24.py", line 20, in <module>
assert QGLContext.currentContext() is not None
AssertionError
ctx should be transferred to C++ in the constructor call; if I look at
qgl.sip, the argument is correctly marked with /Transfer/.
This used to work with PyQt 4.4.2 and SIP 4.7.4.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic