2

I wonder how I can catch the signal, that attributes in a form are editable?

E.G. I open a form to see the values of the attributes of my geodata. Then I click on the "pencil" in QGIS (to make data editable). And right now a message should occure.

I tried:

def test(): qgis.utils.iface.messageBar().pushMessage("Status: ", u"Status: ")

    myDialog.modeChanged.connect(test)

...but that`s obviously not the correct way. Could anybody help?

1

I found a solution now. Via the layerObject it`s possible to get the EditingStatus:

   def testAusgabe(): qgis.utils.iface.messageBar().pushMessage("Statusx: ", u"Statusy: ")

    MyLayer.editCommandStarted.connect(testAusgabe)
    MyLayer.editingStarted.connect(testAusgabe)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.