Re: [Qgis-developer] Open a project file programmatically

2015-03-17 Thread Matthias Kuhn
Hi, Does iface.addProject( path ) work? Matthias On 03/17/2015 10:16 AM, Olivier Dalang wrote: Hi ! I'm trying to load a project file using python in a plugin, but am encountering some problems. I simply want to have exactly the same behavior as if the user was choosing open from the

Re: [Qgis-developer] Open a project file programmatically

2015-03-17 Thread Nathan Woodrow
http://qgis.org/api/classQgisInterface.html#ac23b3947fa382bf08a5f0164bac8b053 - nathan On Tue, 17 Mar 2015 7:16 pm Olivier Dalang olivier.dal...@gmail.com wrote: Hi ! I'm trying to load a project file using python in a plugin, but am encountering some problems. I simply want to have

Re: [Qgis-developer] Open a project file programmatically

2015-03-17 Thread Olivier Dalang
Hi Matthias, Yes it seems to work ! I guess I didn't find it because I was looking for load/open rather an add... I don't get the save prompt if the current project what modified though, but in my case it's good enough. Thanks a lot for the quick answer ! Olivier 2015-03-17 10:19 GMT+01:00

[Qgis-developer] Open a project file programmatically

2015-03-17 Thread Olivier Dalang
Hi ! I'm trying to load a project file using python in a plugin, but am encountering some problems. I simply want to have exactly the same behavior as if the user was choosing open from the project menu, and selecting one particular file. The C++ QgisApp class has an void openProject(const