I am building a QGIS plugin, and want to add some base maps from the shapefiles which were stored in the PostgreSQL database.
My question is:
Is there a way to import shapefiles stored in the database into the QGIS plugin without displaying in the map canvas?
Updated on 13/06/2019:
Sorry I didn't explain the question clearly. I will try to describe my question in more detail.
Currently, I managed to store shapefiles in the database (Figure 1) and use "Add PostGIS Layer" (Figure 2) to visualise the shapefile in QGIS (Figure 3).
In the plugin I am going to build, I would like to choose one of these shapefiles (stored in the database) as my environmental layer (something like a base map).
However, my problem is that I can only choose the layers from the map canvas (shapefiles which have already been added into QGIS). My plugin looks something like figure 4, when users click the red circle, a list of shapefiles stored in the database is supposed to be displayed instead of maps on QGIS canvas.