Re: [QGIS-Developer] Loading layer from specific table/view after running algorithm

2023-08-07 Thread Raymond Nijssen via QGIS-Developer
Found the answer to my own question in old posts here. (Thank you Matteo!) I have added this code to the processAlgorithm() function: ``` context.addLayerToLoadOnCompletion( f'{gpkg_fn}|layername=my_view', context.LayerDetails( name='my_view',

[QGIS-Developer] Loading layer from specific table/view after running algorithm

2023-08-07 Thread Raymond Nijssen via QGIS-Developer
Hi developers, I have created a processing algorithm in python that creates a new gpkg database with a bunch of tables and views. One of the views can be loaded as a polygon layer, which works fine when loaded manually. How can I tell QGIS to load that view as a polygon layer when the algori