I use QMultiHash for categories (keys) and subcategories (values). In a wizard page I want to have two QComboBox-es - the first for selecting a category (say - arts, education, engineering, leisure and sports, ...) and the second one for a subcategory (say, for engineering one could select civil, electrical, mechanical, ...).

Of course, the values of the second combo box are determined by user's selection in the first one. How can I do that? It would be great if somebody could help with a simple example code.

I suppose I need to use signals and slots, but after many hours of trying I still haven't managed to work it out. I'm a complete QT newbie and relatively new to C++.