How to get Comment Value of a QComboBox Item?
-
How can I access the comment value of a ComboBox Item in my code:
!http://luna-arts.de/others/misc/qcombobox.png(qcombobox)!Thanks
Regards
Denis -
Hi,
the "comment" field is intended to provide help to translators.
I think ther's no way to access it by code. -
True. It is a field that you'll find with all (translatable) QString values. It is used as an argument in the call to the translator, but it cannot be retreived by any API. Instead, it is extracted by the code that goes over your sources to look for translatable strings.
-
hmm. ok, thats a pitty. But yeah, ok, thanks for the quick reply.
-
Hi,
to set some extra data for QComboBox items you can use setItemData() but this can be done only coding (not via Designer)
-
cool, thanks! That helps a lot!