How propery use the layer selection changed method? I am using following method. It shows error

"NoneType" object is not callable

def test(): 
    print "selection changed"


  • 2
    Hard to answer if you show so little of your code ! How did u define your layer variable ? + i think the connection between signal (selectionChanged) and slot (the test function) must be elsewhere (i mean not in the body of the function called when signal is triggered) ... – snaileater Apr 1 at 15:57
  • 1
    Could you show the full error message? Another thing: Just like @snaileater said, you have to set the connection between the signal and slot in another method. Normally you would do this in your constructor. That would be the __init__ method of your class. – Blinxen Apr 1 at 21:23

Your Answer

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

Browse other questions tagged or ask your own question.