Unsolved QCheckBox, setting custom values for states?
-
Is it possible to set or associate values to a checkbox so when it is clicked it has one value and when it isn't it has another?
-
@SPlatten
QCheckBox
itself has a boolean/tristate value. Derive fromQCheckBox
and add your own property/return result. -
Done it already :)
-
Hi,
What kind of values do you have in mind ?
-
@SPlatten
Yeah well that's because it was only a one-liner, right? :) -
One day soon I'll create a post to share what I've been working on, not quite ready yet but soon.
-
@SPlatten
You could choose to use QObject::property(const char *name), and change its value when the check changes, to implement something which could be exposable to the outside world. If you wanted.