NZ Farmer gave a solution how to use a control function for a customised attribute form from within your own plugin. It seems that the control function accompanying a customised UI Form needs to be a py file somewhere located (addressed with layer.setEditFormInit), but I would like it to be part of my running plugin.

NZ Farmers'solution: In the init method of your plugin: Firstly add the plugin directory to the system path list (or a subdirectory of it) Secondly, initialise a static variable with the Plugin's instance (self)

However, I cannot figure out NZ Farmer's solution, i.e. how to put that solution in Python code and where the code should be placed. Or perhaps there is a different solution. Any help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.