[PyQt] Problem with threaded ftp: Cannot queue arguments of type 'QUrlInfo'

Brian Knudson briank at pipelinefx.com
Tue Nov 20 19:44:56 GMT 2012

On Nov 20, 2012, at 2:21 AM, Phil Thompson wrote:

> On Fri, 16 Nov 2012 14:40:10 -0800, Brian Knudson <briank at pipelinefx.com>
> wrote:
>> Any ideas how to correct this?
> It's arguably a Qt bug - it should call qRegisterMetaType() itself for any
> types used in signal arguments.
>> Here's some example code (pardon the length).  I would like to be able
> to
>> print the listed files/urls from the function "lister".  Ultimately, I'd
>> like to then have that function formulate new urls & pass them back to
>> connectAndDownload to download each of the files (of course, this will
>> require modifications to connectAndDownload, but we're not there yet).
> Why use threads at all? QFtp is asynchronous and won't block. If you need
> to do some blocking processing of the results then create threads for that.

Hmm.  Good point.  I've tested this again in the main thread & it works as expected.

FWIW, I had already written the threaded ftp for multiple ftp streams & was trying to reuse it for this purpose (hence the threads).  Assuming this is a Qt bug, I'll happily skip the threaded bit & move back to the main thread.


More information about the PyQt mailing list