dicogis.utils.qgis_runtime module¶
Detection of a running QGIS, shared by the Qt binding and the network layers.
Kept apart from dicogis.utils.environment, which imports GDAL and PyProj: the Qt binding is resolved at first import and must not load them.
- dicogis.utils.qgis_runtime.qgis_application_is_running()¶
Tell whether this process runs inside QGIS (desktop, plugin, qgis_process).
Never imports QGIS itself: only looks at a qgis.core already loaded. QGIS merely being imported is not enough: some libraries import it on their own when QGIS is installed (pgserviceparser >= 3 does), which loads qgis.core in a standalone process too.
- Return type:
- Returns:
True if the running Qt application is a QgsApplication