Hello,

The checkbox has the ability to be tri-state (unchecked | partially checked | checked). So using setCheckState() will require a Qt.CheckState enum, since this is how you set it's tri-state value. What you want to use is

setChecked(True) or setChecked(False)

That should work. If you want to ensure that it cannot have a tristate mode use setTristate(False).

It's all in the docs: http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qcheckbox.html

Darryl

Min Li wrote:

Hi, everyone.

Sorry to bother your guys.

I'm a Novice in PyQt. Currently, I want to set the 'clicked' status as the default status for QcheckBox.
I have tried some ways, such as setCheckState().

However, they're not working. I think I use it in a wrong way.

Could you pleasae give me some advices for that?

Regards

Lee

------------------------------------------------------------------------

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to