[PyQt] How to use a QCheckBoX
Fabien Lafont
lafont.fabien at gmail.com
Wed Jan 11 18:38:25 GMT 2012
And How can I undo the last action?
2012/1/11 Vincent Vande Vyvre <vincent.vandevyvre at swing.be>:
> Le 11/01/12 19:03, Fabien Lafont a écrit :
>
> Hello everyone,
>
> I'm trying to use a QCheckBox. I manage to connect it to a "def" but I
> want that when I "Uncheck" the QCheckBox it cancel the last action.
>
> In fact I'm adding a line to my code and I want to "comment it" when I
> reclic:
>
> self.ButtonCroix = QCheckBox("croix")
> self.ButtonCroix.stateChanged.connect(self.croix)
>
>
>
> def croix(self) :
> self.cursor = Cursor(self.ax
> , useblit=True, color='blue', linewidth=2 )
>
> Thanks in advance,
>
> Fabien
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> What's the problem ?
>
> In your function croix(), you can verify if the QCheckBox is checked or not
> and undo the last action if not.
>
> --
> Vincent V.V.
> Oqapy . Qarte+7 . PaQager
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list