简体   繁体   English

适用于QGIS的Python插件

[英]Python Plugins for QGIS

I am working with python plugins for QGIS . 我正在使用QGIS的python插件。 I am done with my one of my .py file using python 2.5 and pyqt4. 我已经完成了使用python 2.5和pyqt4的.py文件之一的工作。 It is just help file for QGIS, which I changed. 它只是QGIS的帮助文件,我对此进行了更改。 I wanted to in-cooperate the same in QGIS. 我想与QGIS合作。 I installed QGIS 1.7.1. 我安装了QGIS 1.7.1。

I know it to be done through python plugins. 我知道这是通过python插件完成的。 But how to go about it? 但是如何去做呢? where to copy my file, so that it will get open from QGIS? 将文件复制到哪里,以便可以从QGIS打开文件? QGIS already has that page(help file), I need to change it. QGIS已经有了该页面(帮助文件),我需要对其进行更改。

help me out. 帮帮我。

If you're creating a QGIS plugin in Python, you may want to place it in your .qgis/python/plugins folder. 如果要使用Python创建QGIS插件,则可能需要将其放在.qgis / python / plugins文件夹中。 Actually, you should create a subfolder below that. 实际上,您应该在其下创建一个子文件夹。 But that's not all, your code has to provide certain functions in order to get hooked up properly into QGIS. 但这还不是全部,您的代码必须提供某些功能才能正确连接到QGIS。 http://qgis.org/pyqgis-cookbook/plugins.html#plugins provides detailed information about that. http://qgis.org/pyqgis-cookbook/plugins.html#plugins提供了有关此信息的详细信息。 Once your Python plugin is complete and located in the correct location, you'll have to enable it in the QGIS Plugin Manager (choose Plugins/Manage Plugins... from the manu). 一旦Python插件完成并且位于正确的位置,您将必须在QGIS插件管理器中启用它(从手册中选择Plugins / Manage Plugins ...)。 I'm not sure if your question is about creating QGIS Python Plugins or about replacing QGIS menu items via Python - could you clarify this? 我不确定您的问题是关于创建QGIS Python插件还是通过Python替换QGIS菜单项-您能澄清一下吗? Are there any error messages for the things that are not working? 对于不起作用的东西是否有任何错误消息? Could you post your code (or relevant parts of it) for review (this might speed up the process of finding a solution)? 您能否发布您的代码(或代码的相关部分)以进行审核(这可能会加快找到解决方案的过程)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM