Qt 6.11 is out! See what's new in the release
blog
QCheckBox - how to have and not have tristate at the same time? ;)
-
Hello,
In my application sometimes I need to set up QCheckBox to Qt::PartiallyChecked. It works fine, however when user clicks on QCheckBox I don't want to give him possibility to set up this state. User should be able to setcheckbox only to Qt::Unchecked or Qt::Checked. What is the best way to implement this?
Thanks for your help.
-
Connect to
stateChanged(int state)signal and if the param is anything butQt::PartiallyCheckedcallsetTristate(false).