Hi all! I'm working with QCheckBox and I can't find any way of assigning a value to it. Here's an example of what I'm trying to do:
I have a list of languages, and the user can select one or more of them. So I create a list of this languages, each one is a QCheckBox:
[] English
[] French
[] German
[] Spanish
The thing is, when I create this checkboxes, how can I tell Qt that the value of the first one is EN, the value of the second one is FR, etc...? (like the value attribute used in HTML). I need this in order to know which language codes have been checked.
Right now what I'm doing is subclass QCheckBox to add a custom propertie named value, but I wonder if I'm missing anything, maybe QT already has a way to do this and I just didn't find it!
Any help will be appreciated, thanks!
Bookmarks