If only one box can be checked at the same time then place all of them into a QButtonGroup and use API of the latter to learn which of the buttons is checked. And optionally use QRadioButton instances instead of QCheckBox.