[PyKDE] Window refresh from another process

Albert Cervera Areny informatic at sedifa.com
Wed Jul 2 17:48:01 BST 2003


> On Wed, Jul 02, 2003 at 12:07:56PM +0200, Albert Cervera Areny wrote:
>> >>
>> >>   The problem is that when the event occurs the window isn't
>> refreshed
>> >> until I move the mouse cursor. The XML-RPC process calls the window
>> >> addEvent function (I've written) and the last thing it does is
>> calling
>> >> self.repaint(0) but it doesn't work.
>> >>
>> >>   Does somebody have a clue of how I could solve this?
>> >
>> > Is self.update() any better?
>>
>> No. It's exactly the same
>
> I suppose that you're running the XML-RPC server at one thread and the
> graphic front-end at another. If that's the case, are you aware that you
> can't simply update the graphics from the XML-RPC thread, but only from
> the main, graphics, thread (it is, if you want immediate results)? It's
> the same you can see with Java's SWING, and others.

Then, how could I do this? The XML-RPC server is blocking and can't think
how I could make it run in the same thread.
Another possibility would be repainting from the GUI thread, I imagine,
but I can't see how could I do this at regular intervals once the
exec_loop() function is called. Is there a way of doing the loop myself
and calling some qt function at each iteration?

>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>
>


Albert Cervera Areny




More information about the PyQt mailing list