[PyQt] got stuck translating webftpclient example to PyQt

Hans-Peter Jansen hpj at urpla.net
Sun Feb 2 14:46:43 GMT 2014


On Sonntag, 2. Februar 2014 04:52:57 Moritz Warning wrote:
> Alright, writing a detailed report gives you ideas. :)

For this very reason, one third of all issues people have, vanish magically, 
if you ask them to create a minimal runnable example. ;-)

> This is the fix:
> https://github.com/mwarning/PyQt4-Examples/commit/655072921b5e34175e2ca7647a
> e5d301c99d878b
> 
> The signature for getData was wrong. But the error didn't show up on the
> console (huh?). Debugging using eric4 shows the error.

Converting Qt examples is a great learning experience.

BTW, you should avoid using QString nowadays (in preference of Py3 
compatibility). Start your code with

import sip
sip.setapi('QString', 2)

and use unicode strings, wherever QStrings are used in Qt..


Pete


More information about the PyQt mailing list