QField 插件¶
QField 具有 QML/JavaScript 插件框架,可以通过该框架编写脚本来实现额外的功能和特性。
插件类型¶
Plugins can be served in two ways:
- 作为项目特定插件,在给定项目会话期间激活;
- 作为应用程序插件,在 QField 启动时激活。
笔记
在激活插件之前会弹出权限对话框,你可以决定是否授予该插件权限。
Project plugins¶
Project plugins are deployed as a sidecar file to a given project file and must share the same file name with a .qml extension. For example, if your project file is “tree_inventory_qfield.qgs”, the plugin’s main QML file must be “tree_inventory_qfield.qml”.
For cloud projects, you simply add the relevant QML file into your local cloud project folder and upload the newly added file on QGIS using qfieldsync. This method insures a smooth plugin deployment and update to devices on the field.
For non-cloud projects, refer to the QField storage handling documentation page to learn how to import projects onto devices.
Application plugins¶
Application plugins are installed through a plugins popup accessed from QField’s Settings panel. Simply hit the ‘Install plugin from URL’ button and paste in a URL pointing to a zipped plugin file.
Once installed, the plugin will appear in the plugins list found in the popup, with a switch to toggle the activation of the plugin.