2

I know it is possible to associate a layer with a custom UI for editing feature attributes using the QGIS interface by using python:

vectorLayer1.setEditForm('/home/me/uifile.ui')

And I found this to associate the vector layer with python init method:

vectorLayer1.setEditFormInit('moduleName.functionName')

But this only allowed when the module (python file) located in the same directory as my project. Is there any ways to load from external file?

  • between, i'm using QGIS 2.18 – Cy T Nov 15 '16 at 10:09
2

I had the same issue, but I found a way to avoid it. I just set the right external file to my Style (.qml) and I do use Layer.setEditForm() and Layer.setEditFormInit() and it works perfectly!

  • Cy T does anything worked out for you ? if yes can you accept the answer or share your experience ? it will be valuable for other. Thanks. – Abhijit Gujar Feb 22 '17 at 9:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.