PyQGIS some GUIs(e.g. QgsMapLayerComboBox,QgsFieldComboBox) don’t work in custom application
I’m trying to make a custom application based on PyQGIS.I have made QGIS plugin and I used QgsMapLayerComboBox
,QgsFieldComboBox
and some other QGSI custom GUI widget.
PyQGIS some GUIs(e.g. QgsMapLayerComboBox,QgsFieldComboBox) don’t work in custom application
I’m trying to make a custom application based on PyQGIS.I have made QGIS plugin and I used QgsMapLayerComboBox
,QgsFieldComboBox
and some other QGSI custom GUI widget.
PyQGIS some GUIs(e.g. QgsMapLayerComboBox,QgsFieldComboBox) don’t work in custom application
I’m trying to make a custom application based on PyQGIS.I have made QGIS plugin and I used QgsMapLayerComboBox
,QgsFieldComboBox
and some other QGSI custom GUI widget.
How can I use python (PyQGIS) to create a layer then set a field to use the Value Map widget type and then export it as a geopackage?
I have created a layer in python with 3 fields: fields = [QgsField("name", QVariant.String),QgsField("code", QVariant.String),QgsField("email", QVariant.String)]
As per this thread https://gis.stackexchange.com/questions/456730/use-pyqgis-to-load-value-map-against-attribute, I have tried to give the code field a Value Map (widget type):