Le 11/01/12 19:38, Fabien Lafont a écrit :
And How can I undo the last action?

2012/1/11 Vincent Vande Vyvre <vincent.vandevy...@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@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@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Seems a Python answer, not PyQt.

Consider to post it here:

http://www.developpez.net/forums/f96/autres-langages/python-zope/

with the advantage of your natural langage.

--
Vincent V.V.
Oqapy . Qarte+7 . PaQager
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to