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 Answer 1

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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