top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to differ between checked and unckecked in python?

+1 vote
227 views

My program have a set of checkbox, When user check a checkbox, i should call slot1() and when user uncheck checkbox, i should call slot2(). But I can't understand when user checks and unchecked.

My questions is, How can i find out user check and unchecked checkbox? It's very important that I differ between check and unckeck.

posted Sep 15, 2013 by Naveena Garg

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Assuming that your are using PyQt.

So, there's no different signal for each state of the QCheckBox, create one slot that will call the good function in accordance with the state which is the argument of the signal stateChanged.

answer Sep 15, 2013 by Kumar Mitrasen
...