How to differ between checked and unckecked

Vincent Vande Vyvre vincent.vandevyvre at swing.be
Sun Sep 15 03:56:33 EDT 2013


Le 15/09/2013 09:34, Mohsen Pahlevanzadeh a écrit :
> Dear all,
>   
>
> 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.
>
> Yours,
> Mohsen
>
>

In my crystal ball I see 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 
wich is the argument of the signal `stateChanged`.

-- 
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte 
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>



More information about the Python-list mailing list