Bug report #7286
Assigning editForm for the layer doesn't work properly
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Forms | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Windows 7 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16295 |
Description
QGIS doesn't show my custom form after assigning it through layer.setEditForm("form.ui").
If I go to the layer's properties (Fields) and select Attribute editor layout = "Provide ui-file", I can see a correct path to my UI form. If I click OK now, to save settings and try to add a new feature, the form pops up as it used to be with version 1.8
Associated revisions
Automatically switch editor layout when assigning .ui file
Fix #7286
History
#1 Updated by Jürgen Fischer over 10 years ago
- Category set to Forms
#2 Updated by Jürgen Fischer over 10 years ago
- Target version changed from Version 2.0.0 to Future Release - Lower Priority
#3 Updated by Matthias Kuhn over 10 years ago
You need to also change the editor layout.
layer.setEditorLayout( QgsVectorLayer.UiFileLayout ) layer.setEditForm('form.ui')
#4 Updated by Matthias Kuhn over 10 years ago
- Status changed from Open to Closed
Fixed in changeset f87bddf834557d91e42307d9deb9faf85e662c75.