I try to run python at QGIS startup. The script :
from qgis.core import QgsProject from PyQt4.QtCore import QFileInfo project = QgsProject.instance() project.read(QFileInfo('D:/test/qgis/1.qgs'))
I save as startup.py in C:\Users\USER.qgis2\python. The project is successfully opened. There are two layer. A vector and a raster. But, there is a notification : "Do you want to save the current project?". If I click 'Save' or 'Discard', the 1.qgs is saved , and then there is a blank project. If I click 'Cancel', the 1.qgs is still opened. It is disturb a lay user. While I don't want to close the project. I just want to load the project.
How do I remove this notification?