> 
> 
> 
> Hi David, 
> 
> You  need an event loop to use a Q(qg)NetworkAccessManager, it's asynchronous.
> 

Hi Alessandro,

Yes, we know that (see the second code in previous mail  ):  the  
QgsNetworkAccessManager works perfeclty in python, this is not the point.

The point is: trying to instanciate  a  wmsprovider will issue a timeout when 
trying to request the capabilities: the code responsible for that creates its 
own QEventLoop and manage to do a blocking call (which is expected here). 
Please have a look at 
https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
 
<https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964>.
  What we do not understand is why, despite the call of loop.exec() in the c++ 
code, the request is not processed (my example with the  
Q(gs)etworkAccessManager
shows that it should processed)

Actually you cannot instanciate properly a QgsProject with a WMS layer.

To convince yourself, try to instanciate a QgsProject in python (in a 
standalone python script) from a .qgs project having a single wms layer: it 
will fail to instanciate the layer.

> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it <http://www.itopen.it/>
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to