[PyKDE] Seperating logic code from gui code?
pemboa at gmail.com
Mon Dec 19 00:33:00 GMT 2005
I think your advice wil be quite helpful, it wil take some rereading and
googling, but thank you.
On 12/18/05, David Boddie <david at boddie.org.uk> wrote:
> On Fri, 16 Dec 2005, Arthur Pemberton wrote:
> > Ideally, the console client would be simply a downloader, while the GUI
> > would use the same mechanisms to access the data, but give more
> > interactivty (renaming, prioritizing of downloads, etc.) Not sure if
> > is the information you meant that was missing.
> OK. So you could implement the downloader in such a way that makes it
> fairly independent from the way it was invoked. Perhaps it would perform
> blocking network operations using modules from the Python standard
> or maybe you would provide a way for the main application to monitor its
> progress and interrupt it if required.
> Keeping the GUI interactive while a long-term operation is being performed
> can be a challenge, especially if the control isn't returned until the
> operation is finished. There are ways to ensure that the GUI interface is
> refreshed while this occurs: by calling QApplication.processEvents() or
> by performing the operation in a separate thread.
> Note that GUI programming has to be performed in the main thread - you
> (easily) make calls to PyQt from a separate thread.
> If the console-only version of the client doesn't use PyQt, and you want
> use the same implementation in the GUI client, you can probably use
> threading module to run the downloader in a separate thread. I guess this
> should work with PyQt for Qt 3 as long as you don't use the Qt's threading
> features. You may not use threading in the console-only client - users may
> satisifed with a client that only provides feedback once it is finished.
> I hope this advice is helpful, even if it is a bit vague. I'm sure others
> will correct me if what I've said is confusing.
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
As a boy I jumped through Windows, as a man I play with Penguins.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt