[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] Re: newbie: QFileDialog
From:       Eli Carter <eli.carter () inet ! com>
Date:       2002-08-30 14:35:23
[Download RAW message or body]

Paul Felix wrote:
>>From: Eli Carter <eli.carter@inet.com>
[snip]
>>I want to use QFileDialog to let a user pick files on a remote system,
>>such as over an ftp connection.  I'm not really sure where to start.  I
>>expect to subclass it, but I don't know what internals would need to be
>>overridden, where to find that out, or if that is possible in pyqt.
[snip]
> I believe the answer is QUrlOperator.  Try this:
> 
> from qt import *
> from qtnetwork import *
> 
> qInitNetworkProtocols()
> 
> op = QUrlOperator("ftp://ftp.trolltech.com")
> 
> fd = QFileDialog()
> fd.setUrl(op)
> fd.exec_loop()

Yeah, that looks like what I want. :)  Particularly the ::copy() 
operator (http://doc.trolltech.com/2.3/qurloperator.html) and the fact 
that it can give a progress signal, which is something else I wanted to 
do but hadn't gotten to.  Thanks for the excellent lead! :)

Hrmm... RedHat 7.2 doesn't seem to have qtnetwork available, though 
Mandrake 8.2 does.  I wonder if RH7.3 does...  *mutter* Oh bother.

Thanks again,

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------

_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic