Skip to content

Commit

Permalink
Move Init function line edit so visible all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Mar 31, 2013
1 parent 5660bc5 commit 7d9f444
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions src/ui/qgsfieldspropertiesbase.ui
Expand Up @@ -96,7 +96,7 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="7">
<item row="3" column="0" colspan="7">
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item>
<widget class="QWidget" name="mAttributesListFrame" native="true"/>
Expand All @@ -110,7 +110,7 @@
<item row="1" column="0" colspan="3">
<widget class="QStackedWidget" name="mAttributeEditorOptionsWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page">
<layout class="QGridLayout" name="gridLayout_2">
Expand All @@ -128,16 +128,6 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Init function</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="leEditFormInit"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
Expand Down Expand Up @@ -321,6 +311,30 @@
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QLineEdit" name="leEditFormInit"/>
</item>
<item row="1" column="5">
<widget class="QLabel" name="label_3">
<property name="toolTip">
<string>QGIS forms can have a Python function that is called when the form is opened.
Use this function to add extra logic to your forms.

An example is (in module MyForms.py):

def open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget,&quot;MyLineEdit&quot;)

Reference in Python Init Function like so: MyForms.open

MyForms.py must live on PYTHONPATH, .qgis/python, or inside the project folder.</string>
</property>
<property name="text">
<string>Python Init function</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
Expand Down

0 comments on commit 7d9f444

Please sign in to comment.