[PyKDE] Working with empty QStrings
Phil Thompson
phil at river-bank.demon.co.uk
Mon Jan 17 20:21:38 GMT 2000
Boudewijn Rempt wrote:
>
> I was playing with KFileDialog just now (again trying to get a really
> good template for PyKDE applications), and I noticed that my app kept
> crashing if I canceled the file open dialog.
>
> It turns out that if you try to convert and empty (QString.isEmpty()=TRUE)
> QString to a Python string you don't get "" nor None, but a segfault.
> Would it be a good idea to have str(QString) where QString.isEmpty==TRUE
> return None? Once you know the current behaviour it isn't a direct
> problem, but anything that can cause a segfault is unpleasant, of
> course.
>
> Boudewijn Rempt | http://www.xs4all.nl/~bsarempt
Consider it a bug - v0.9 did the right thing. Looks like there is going
to be a v0.10.1 of PyQt as well as SIP.
Phil
More information about the PyQt
mailing list