使用python的Qgis插件构建器

问题描述

我正在尝试在 qgis 中创建插件。我使用 3 个组合框创建了插件工具 dilog 框,在那个组合框中,我从 qgis 层获取数据作为输入,我需要 2 和 3 个组合框的编码来列出输入层数据帧索引。

我使用代码在第一个组合框中获取图层

 # Fetch the currently loaded layers
 layers = QgsProject.instance().layerTreeRoot().children()

    # Clear the contents of the comboBox from previous runs
    self.dlg.comboBox.clear()
    # Populate the comboBox with names of all the loaded layers
    self.dlg.comboBox.addItems([layer.name() for layer in layers])

enter image description here

enter image description here

在组合框 2&3 中列出

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)