[PyKDE] PyQt segfault with QStringList
    Torsten Marek 
    shlomme at gmx.net
       
    Sun Jul 20 21:43:00 BST 2003
    
    
  
Hello,
is it an intended behaviour, that
### -- code --
from qt import *
class Test:
	def __init__(self):
		self.str = QStringList.split(".", "test.tst")[0]
	def test(self):
		print self.str
### -- code --
segfaults? It is obvious that self.str does not "steal" a reference, and 
that can be easily circumvented by putting QStringList(....)[0] into a 
QString constructor, but I do think that this behaviour is not very 
intuitive.
The operator[](*) functions of QStringList return sipMapCppToSelf(...), 
is it possible to call Py_INCREF on them? Or is it impossible due to the 
implementation of QStringList on C++ level?
thanks for your help
Torsten
-- 
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- fingerprint 1902 0002 5DFC 856B F146  894C 7CC5 451E 
A244 C858
www.keyserver.net -- wwwkeys.eu.pgp.net
< information must flow >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 252 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20030720/4b3ecfaf/attachment.bin
    
    
More information about the PyQt
mailing list