Skip to content

Commit

Permalink
Fix code sample
Browse files Browse the repository at this point in the history
Without, the project does not "visually" load in QGIS
  • Loading branch information
DelazJ committed May 14, 2024
1 parent aee5f9f commit 5deb248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pyqgis_developer_cookbook/loadproject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The following can be done:

readflags = Qgis.ProjectReadFlags()
readflags |= Qgis.ProjectReadFlag.DontResolveLayers
project = QgsProject()
project = QgsProject.instance()
project.read('C:/Users/ClintBarton/Documents/Projects/mysweetproject.qgs', readflags)
To add more flags the python Bitwise OR operator (``|``) must be used.

0 comments on commit 5deb248

Please sign in to comment.