whatnick / demo_qgis_app

Barebones QGIS Stand-alone app to demonstrate using PyQGIS to build custom GIS applications
5 stars 3 forks source link

Sample Standalone QGIS App for windows

Developer Setup

Developer Setup

Packaging executable for Windows

PyInstaller is recommended for folder / single file based distribution of the QGIS application. There is a nice tutorial / answer on StackOverflow. This approach is included here for distribution of the application. It involves 2 steps:

To get the packaging tooling install pyinstaller via pip into the OSGeo4W python 3.7 environment ( current as of 28-09-2020). Python3-pip must be installed as a package in the osgeo4w setup. It is safer to pack a heavier directory based version of the application to avoid possible DLL hell due to different versions of QGIS being installed on the user machine compared to the developers. Install pyinstaller from PyPI, python3 -m pip install setuptools pyinstaller should work on most platforms.

Sample Data Attribution

Sample Code Attribution

Application Screenshot