[Qgis-user] problem with loading project
shashank khare
skhare at hotmail.com
Fri Jan 30 07:21:05 PST 2015
Hi!
I am trying to load a project into qgis when a different project is already loaded by doing this in my plugin:
QgsProject.instance().clear() QgsProject.instance().setFileName('d:/shashank/test/second.xml.qgs') QgsProject.instance().read()
It does not load the project. Interestingly it loads the project when I execute the command in python console. Also it does not work if I put the three lines inside a function and execute the function in python console.
Thanks in advanceShash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150130/1bfefcb4/attachment.html>
More information about the Qgis-user
mailing list