[QGIS-Developer] Problem with Loading a new project file

Prof. Dr. Jörg Höttges hoettges at fh-aachen.de
Fri May 11 02:17:59 PDT 2018


I have a problem with loading a project file at the end of a python plugin:

    project = QgsProject.instance()
    project.read(QFileInfo(projectFile))         # read the new project file

Only a few layers are loaded, no styles etc. When I close the project and reload it manually, everthing is o.k.

How can I load the project file correctly?

Best wishes,


FH Aachen 	
Prof. Dr.-Ing. Jörg Höttges
Fachbereich 2 - Bauingenieurwesen
Wasserwirtschaft und Bauinformatik
FH Aachen
University of Applied Sciences
Bayernallee 9
52066 Aachen | Germany
T +49 (0)241 6009-51176
F +49 (0)241 6009-51206
hoettges at fh-aachen.de <mailto:hoettges at fh-aachen.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180511/5fc76b0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mndejfegndoccoea.png
Type: image/png
Size: 839 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180511/5fc76b0d/attachment.png>

More information about the QGIS-Developer mailing list