Explanation: The widget is actually a macro that generates a new class derived from QComboBox. The macro uses the QMetaEnum and MetaObject system to add items to this combobox that are corresponding to the enum. Using this widget is actually a little bit more refined that in the overview above: Since the MetaObject system is used, only enums declared in QObjects will work (See example included in the source code, main.h and main.cpp).
Ratings & Comments
0 Comments