Found the solution for defining the action:

from PyQt4.QtCore import QFileInfo;
fileName ="[%"Locatie"%]";
fraw = fileName.encode('string_escape').replace('\\\\','\\')
fileInfo = QFileInfo(fileName);
baseName = fileInfo.baseName();
qgis.utils.iface.addRasterLayer(fraw, baseName);

With this code I can click in the combobox in the attributetable and the
rasterlayer loads in the layerpanel.
It would be nice if I could just click on the outline in the map and get the
same result 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to