Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow opening datasource manager dialog via Python #46577

Open
ricardogsilva opened this issue Dec 20, 2021 · 2 comments
Open

Allow opening datasource manager dialog via Python #46577

ricardogsilva opened this issue Dec 20, 2021 · 2 comments
Labels
Feature Request PyQGIS Related to the PyQGIS API

Comments

@ricardogsilva
Copy link
Contributor

Feature description

QGIS currently allows Python plugins to register additional datasource providers by implementing subclasses of QgsSourceSelectProvider and QgsAbstractDataSourceWidget. These can then be hooked up via calling QgsSourceSelectProviderRegistry().addProvider.

This has the effect of letting plugins add new sections to the QGIS datasource manager dialog.

However, there does not seem to be a way to let plugins refer to the datasource manager dialog in order to, for example, create an action to open it on a specific section. This means that it is not possible to implement functionality analogous to the Add Vector Layer... - the concrete use case I have in mind is I'd like to have a Add GeoNode layer... action as part of the QGIS GeoNode plugin.

It would be great to be able to open the QGIS datasource manager dialog on arbitrary sections from Python. This would make for a more seamless experience for plugins

Additional context

No response

@ricardogsilva
Copy link
Contributor Author

cc @Samweli - this is related to our GeoNode/QGISGeoNodePlugin#166

@Samweli
Copy link
Contributor

Samweli commented Dec 21, 2021

cc @Samweli - this is related to our kartoza/qgis_geonode#166

noted @ricardogsilva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request PyQGIS Related to the PyQGIS API
Projects
None yet
Development

No branches or pull requests

3 participants