[Qgis-developer] How can I get the layer path and directory name from a comboBox?

Stefano Masera stefano.masera at arpa.piemonte.it
Wed Mar 5 01:57:08 PST 2014


Thanks! 

----- Messaggio originale -----

Da: "Gino Pirelli" <luipir at gmail.com> 
A: "Stefano Masera" <stefano.masera at arpa.piemonte.it> 
Cc: "qgis-developer" <qgis-developer at lists.osgeo.org> 
Inviato: Lunedì, 3 marzo 2014 23:08:45 
Oggetto: Re: [Qgis-developer] How can I get the layer path and directory name from a comboBox? 


all info in QgsMapLayer: 
http://qgis.org/api/classQgsMapLayer.html 



in your case: layer.source() 



On 3 March 2014 16:43, Stefano Masera < stefano.masera at arpa.piemonte.it > wrote: 




Hi list, 


I have a plugin where I choose a layer from a comboBox. 


How can I get the layer path and directory name in the code? 


For example, in order to get the layer name and use it in the code, I use: 



layer_name = ftools_utils.getVectorLayerByName(self.comboBox.currentText()) 


Is there something to get the layer path and directory name? 


Thanks. 


Stefano 

_______________________________________________ 
Qgis-developer mailing list 
Qgis-developer at lists.osgeo.org 
http://lists.osgeo.org/mailman/listinfo/qgis-developer 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140305/8e0f0992/attachment.html>


More information about the Qgis-developer mailing list