QgsAttributesFormInitCode 0 0 400 300 Python Init Code Configuration 0 0 16777215 50 0 0 0 0 Function name Enter the name of the form init function. External file Qt::Horizontal 0 0 16777215 50 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok 16777215 50 The function code of the function can be loaded from the source code entered in this dialog, from an external python file or from the environment (for example from a plugin or from startup.py). An example is: rom qgis.PyQt.QtWidgets import QWidget def my_form_open(dialog, layer, feature): geom = feature.geometry() control = dialog.findChild(QWidget,"MyLineEdit") Reference in function name: my_form_open Python Init function The function code of the function can be loaded from the source code entered in this dialog, from an external python file or from the environment (for example from a plugin or from startup.py). An example is: rom qgis.PyQt.QtWidgets import QWidget def my_form_open(dialog, layer, feature): geom = feature.geometry() control = dialog.findChild(QWidget,"MyLineEdit") Reference in function name: my_form_open Qt::Vertical 20 40 QgsCodeEditorPython QWidget
qgscodeeditorpython.h
1
buttonBox accepted() QgsAttributesFormInitCode accept() 254 293 157 274 buttonBox rejected() QgsAttributesFormInitCode reject() 316 260 286 274