Skip to main content
added 40 characters in body
Source Link
Matthias Kuhn
  • 28.2k
  • 3
  • 89
  • 130

There is the possibility to add python code to the QGIS form startupattribute forms which will be executed when it opens. To configure it go to the Fields tab in the layer properties and change the Python Init Code combobox.

If you choose Provide code in this dialog you will see the code. As long as this combobox is set to a different entry the code will not be executed. The code which you see is the default template for the code.

N.b. python code does not require a return statement to be working.

There is the possibility to add python code to the QGIS form startup. To configure it go to the Fields tab in the layer properties and change the Python Init Code combobox.

If you choose Provide code in this dialog you will see the code. As long as this combobox is set to a different entry the code will not be executed. The code which you see is the default template for the code.

N.b. python code does not require a return statement to be working.

There is the possibility to add python code to the QGIS attribute forms which will be executed when it opens. To configure it go to the Fields tab in the layer properties and change the Python Init Code combobox.

If you choose Provide code in this dialog you will see the code. As long as this combobox is set to a different entry the code will not be executed. The code which you see is the default template for the code.

N.b. python code does not require a return statement to be working.

Source Link
Matthias Kuhn
  • 28.2k
  • 3
  • 89
  • 130

There is the possibility to add python code to the QGIS form startup. To configure it go to the Fields tab in the layer properties and change the Python Init Code combobox.

If you choose Provide code in this dialog you will see the code. As long as this combobox is set to a different entry the code will not be executed. The code which you see is the default template for the code.

N.b. python code does not require a return statement to be working.