Is there a PyQGIS way to check if an active layer iface.activeLayer()
is not a GeoPackage format?
1 Answer
You can use:
if iface.activeLayer().storageType() != 'GPKG':
print('Active layer is not a GeoPackage format')
You can use:
if iface.activeLayer().storageType() != 'GPKG':
print('Active layer is not a GeoPackage format')