<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Le 11/01/12 19:38, Fabien Lafont a écrit :
<blockquote
cite="mid:CAC9H_cjJv235zmJRH8Vp7agdVkcBPjof2YV-sGPLhX6z8+smyA@mail.gmail.com"
type="cite">
<pre wrap="">And How can I undo the last action?
2012/1/11 Vincent Vande Vyvre <a class="moz-txt-link-rfc2396E" href="mailto:vincent.vandevyvre@swing.be"><vincent.vandevyvre@swing.be></a>:
</pre>
<blockquote type="cite">
<pre wrap="">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 <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
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 <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
</pre>
</blockquote>
Seems a Python answer, not PyQt.<br>
<br>
Consider to post it here:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.developpez.net/forums/f96/autres-langages/python-zope/">http://www.developpez.net/forums/f96/autres-langages/python-zope/</a><br>
<br>
with the advantage of your natural langage.<br>
<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy">Oqapy</a> . <a
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
href="https://launchpad.net/paqager">PaQager</a></div>
</body>
</html>