[PyQt] How to use a QCheckBoX

Fabien Lafont lafont.fabien at gmail.com
Wed Jan 11 18:03:10 GMT 2012


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


More information about the PyQt mailing list