But, it fails if I return a tuple containing the size and the string (a message indicating a wrong return type is shown). It only work if a tuple containing a single string is returned. If I understand sip (I first looked to the *.sip yesterday) I would say it is due to this line in %VirtualCatcherCode of readBlock in qiodevice.sip :
sipParseResult(&sipIsErr,sipMethod,result,"(O)",&buf); My Qt version is > 3.0.0 but the same line is used twice so I think it is the same for all versions. Le jeudi 19 Mai 2005 17:52, vous avez �crit�: > > When subclassing QIODevice, I noticed (with a look at qiodevice.sip) that > > readBlock method must return a tuple with a string. I would expect this > > method to return a string. But my knowledge of sip/PyQt is not enough to > > say > > if it is a bug or not. > > It's not a bug - it returns a tuple of the length of the data and the data > itself. I agree it could be made more Pythonic - just return the data as > you suggest (maybe PyQt4). > > Phil -- Yann Cointepas Tel: +33 1 69 86 78 52 CEA - SHFJ Fax: +33 1 69 86 77 86 4, place du G�n�ral Leclerc 91401 Orsay Cedex France _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
