Can I make the QCheckBox label clickable?
Normally when creating a
QCheckBoxwith a label, the label does not respond to clicks of the mouse.
Is there a simple way to let the checkbox respond to clicks on the labels instead of only responding to clicks exactly on the checkbox itself?
Have you tried to create an inherited class from QCheckbox, and reimplement the mousePressEvent() Virtual Function?
Nevermind - in the end it turned out the label was modeled as a separate
QLabelinstead of the
QCheckBox. Once I removed the label, and put the text inside the checkbox, I got exactly what I was asking for.