Yahoo Search Búsqueda en la Web

Resultado de búsqueda

  1. 18 de feb. de 2012 · The iface module is automatically imported when directly working from the Python Console. In the other cases (for example, when running a script from the Processing Toolbox), you need to manually import it in this way: from qgis.utils import iface. Share.

  2. 8 de nov. de 2021 · 买过iface的手机壳很好用 想搜搜平板壳 又搜到ifacemall 这两个品牌一样么?

  3. 1 de nov. de 2019 · Welcome to GIS:SE @KrisanuRoy! Are you using QGIS 3.x? If so, you can import iface using from qgis.utils import iface. Also, could you please edit your question to include some of the sources you looked at? There are batch files available which lets you set the relevant paths accordingly which are useful before running standalone scripts. –

  4. 27 de mar. de 2021 · Somehow, I need access to the QGIS iface object from within my unit test, but how does this work? The plugin logic class begins like # ... class Namari: def __init__(self, iface: QgisInterface) -> None: So a lot of the logic depends on the iface object being available. But I have currently no way of strapping a class instance to my test.

  5. 16 de abr. de 2020 · I use iface.activeLayer() intensively. Therefore, when I open QGIS, firstly I use the following script in QGIS Python Editor not to enter iface.activeLayer() everytime. from qgis.utils import iface L = iface.activeLayer() def activeLayerChanged(): L = iface.activeLayer() iface.currentLayerChanged.connect(activeLayerChanged)

  6. 25 de jun. de 2021 · I have two layers, "line" and "point", I need select a area whit freehand, in this area I need count the number of lines and number point. I run the program and the result appears

  7. 1 de dic. de 2020 · iface is predefined variable in QGIS. It is defined while QGIS starts and refers to QGIS interface. That means you cannot use iface in your standalone application. You can use QgsProject.instance() to get the attributes of a project in your application. project = QgsProject.instance() To get the active layer use the script below:

  8. 4 de ene. de 2017 · from PyQt4.QtCore import * from PyQt4.QtGui import * lg = qgis.utils.iface.mainWindow().findChild(QTreeWidget, 'theMapLegend') lg.selectionModel().clear() # clear just selection lg.setCurrentItem(None) # clear selection and active layer There are three ways to retrieve the current layers, relative to what you may want to do:

  9. 15 de mar. de 2021 · Instead of calling the layer from the API on Qgis with iface.addVectorLayer, you can call it with QgsVectorLayer so it doesn't appear then proceed to a change with the refactor field, save the layer in a temporary directory and add it to the canvas so the user can use it like a normal layer. I edit my answer. –

  10. 12 de ene. de 2020 · Jan 12, 2020 at 22:20. Add a comment. To refresh all layers, you can use the following command : iface.mapCanvas().refreshAllLayers() In your case : self.iface.mapCanvas().refreshAllLayers() The following script work (I write out of a function) : from qgis.utils import iface.

  1. Otras búsquedas realizadas