Hi,
Good to know that =) I'll keep working on my plugin with PyQt. Thanks again
for all the help!
Víctor.
2012/6/19 G. Allegri
> No problems with your basic example with pure python threading. The
> problem is the interaction with the Qt event loop. That's why PyQt
> threading is there ;)
>
>
No problems with your basic example with pure python threading. The problem
is the interaction with the Qt event loop. That's why PyQt threading is
there ;)
giovanni
Inviato da dispositivo mobile
Il giorno 19/giu/2012 12.50, "Víctor González" ha
scritto:
>
> Hi again,
>
> I tried Bernhard's solu
Hi again,
I tried Bernhard's solution and it worked like charm. After digging a
little more into PyQt I found this thread [1] with some answers. Seems like
QtNetworking deals with all this networking and threading issues
internally, so my problem is solved that way.
Regarding Giovanni's comments,
>
> The plugin server unfreezes even if you simply move the mouse over QGis
> (wihtout doing any action on it).
>
This happens only if you move the mouse over the Canvas, while the server
remains freezed while moving on other areas (TOC, toolbar, etc.)
> It must be investigated...
>
> giovanni
>
I've tried it.
I seems it depends on QGis not giving the plugin thread the option to serve
while IDLE waiting for user interaction.
The plugin server unfreezes even if you simply move the mouse over QGis
(wihtout doing any action on it).
It must be investigated...
giovanni
2012/6/19 Víctor Gonzál
Hi Victor,
I happen to have done just that recently. I used QTcpServer, not sure if
it is the best way to do it, but it works with QGIS 1.7.4 and 1.8. I
think I used the PyQt examples. I hope it is of use.
from PyQt4 import QtCore, QtGui, QtSql, QtNetwork
class MyPlugin:
def __init__(sel