|
96 | 96 | </property>
|
97 | 97 | </widget>
|
98 | 98 | </item>
|
99 |
| - <item row="1" column="0" colspan="7"> |
| 99 | + <item row="3" column="0" colspan="7"> |
100 | 100 | <layout class="QHBoxLayout" name="horizontalLayout_15">
|
101 | 101 | <item>
|
102 | 102 | <widget class="QWidget" name="mAttributesListFrame" native="true"/>
|
|
110 | 110 | <item row="1" column="0" colspan="3">
|
111 | 111 | <widget class="QStackedWidget" name="mAttributeEditorOptionsWidget">
|
112 | 112 | <property name="currentIndex">
|
113 |
| - <number>0</number> |
| 113 | + <number>1</number> |
114 | 114 | </property>
|
115 | 115 | <widget class="QWidget" name="page">
|
116 | 116 | <layout class="QGridLayout" name="gridLayout_2">
|
|
128 | 128 | </item>
|
129 | 129 | </layout>
|
130 | 130 | </item>
|
131 |
| - <item row="1" column="0"> |
132 |
| - <widget class="QLabel" name="label_3"> |
133 |
| - <property name="text"> |
134 |
| - <string>Init function</string> |
135 |
| - </property> |
136 |
| - </widget> |
137 |
| - </item> |
138 |
| - <item row="1" column="1"> |
139 |
| - <widget class="QLineEdit" name="leEditFormInit"/> |
140 |
| - </item> |
141 | 131 | <item row="0" column="0">
|
142 | 132 | <widget class="QLabel" name="label">
|
143 | 133 | <property name="text">
|
|
321 | 311 | </property>
|
322 | 312 | </widget>
|
323 | 313 | </item>
|
| 314 | + <item row="1" column="6"> |
| 315 | + <widget class="QLineEdit" name="leEditFormInit"/> |
| 316 | + </item> |
| 317 | + <item row="1" column="5"> |
| 318 | + <widget class="QLabel" name="label_3"> |
| 319 | + <property name="toolTip"> |
| 320 | + <string>QGIS forms can have a Python function that is called when the form is opened. |
| 321 | +Use this function to add extra logic to your forms. |
| 322 | + |
| 323 | +An example is (in module MyForms.py): |
| 324 | + |
| 325 | + def open(dialog, layer, feature): |
| 326 | + geom = feature.geometry() |
| 327 | + control = dialog.findChild(QWidget,"MyLineEdit") |
| 328 | + |
| 329 | +Reference in Python Init Function like so: MyForms.open |
| 330 | + |
| 331 | +MyForms.py must live on PYTHONPATH, .qgis/python, or inside the project folder.</string> |
| 332 | + </property> |
| 333 | + <property name="text"> |
| 334 | + <string>Python Init function</string> |
| 335 | + </property> |
| 336 | + </widget> |
| 337 | + </item> |
324 | 338 | </layout>
|
325 | 339 | </widget>
|
326 | 340 | <resources>
|
|
0 commit comments