I am using QGIS 2.8 version I am invoking QGIS from a third-party application, using the qgis-bin.exe Along with the exe i am passing the raster image as an argument that QGIS will display on loading . In my plugin I want to know whether QGIS was invoked from a third-party s/w or it was launched in the standalone mode. I was passing a flag as command line argument along with the raster and was checking it OnInitializationCompleted Event:
qgis-bin.exe [Raster Image] --flag
But QGIS always try to add all the arguments as layer, so I am getting a warning every time when QGIS is started from that application.
I have read some posts, they talk about calling a script on loading via --code option. Is there any other way.