About 278,000 results
Open links in new tab
  1. qgis 3 - PyQGIS using selected layer from a combobox

    Nov 11, 2019 · Using a normal Qt ComboBox, you have several options to access a layer selected in the combo box. The best way is to use my_combo_box.addItem(layer_name, layer_object) instead of using my_combo_box.addItems(...) for filling the combo box.

  2. pyqgis - Filter combobox to show only Points layers - Geographic ...

    Jan 17, 2020 · Alternatively, you can start Designer with QGIS widgets from the batch file in the bin folder of your installation files: Drag a QgsMapLayerComboBox into your plugin dialog. I suggest changing the object name to something unique to assist with accessing the correct widgets in your plugin.py file.

  3. Class: QgsMapLayerComboBox - QGIS

    Apr 24, 2025 · QgsMapLayerComboBox creates a combo box to display the list of layers (currently in the registry). The layers can be filtered and/or ordered. Parameters: parent (Optional[QWidget] = None) additionalItems (self) → List [str] [source] ¶ Returns the list of additional (non map layer) items included at the end of the combo box.

  4. QCombo box to set layer (for Python QGIS plugin)

    Apr 10, 2014 · I'm attempting to create a function to declare a variable in terms of an item chosen in a QComboBox. It's for a plugin for QGIS 2.0 and 2.2. I'm getting a "list index out of range" error, but cannot see why. I'm wondering if my combobox.currentIndex () isn't giving me what I think it is.

  5. QgsMapLayerComboBox | PyQGIS samples - GitHub Pages

    from qgis.gui import (QgsFieldComboBox, QgsMapLayerComboBox, QgsMapLayerProxyModel) # Create dialog . # Add combobox for layer and field . # Create a form layout and add the two combobox . # Add signal event . print(fieldName) print("Layer field changed")

  6. python - simple PyQt combobox task: populate with layers - Stack Overflow

    May 23, 2017 · I'd like to populate this combo box dynamically with layers in the QGIS legend, then set the active layer based on item choice. My problem is that the combo box only populates if the plugin is reloaded.

  7. python - PyQGIS some GUIs(e.g.

    Aug 18, 2024 · 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.

  8. Adding attribute entries in combobox in QGIS plugin

    Jul 4, 2022 · I recommend very strongly to consider using a custom QGIS widget for your layer combo box. Instead of a generic QComboBox, you can use a QgsMapLayerComboBox. This custom widget will load automatically all layers loaded in the current project, however you can easily filter these to only show polygon layers using:

  9. Class: QgsFieldComboBox - QGIS

    4 days ago · QgsFieldComboBox creates a combo box to display the fields of a layer. The layer can be either manually given or dynamically set by connecting the signal QgsMapLayerComboBox .layerChanged to the slot setLayer.

  10. QGIS Plugin Development: Creating GUI with Qt Designer

    Nov 16, 2017 · Thanks to the Plugin Builder you can load the attribute_transfer_dialog_base.ui file straight into the Qt Designer and adjust it to your needs. It doesn’t take much, just one QLineEdit and a few QComboBox widgets.

    Missing:

    • Combo Box

    Must include:

Refresh