I will have a function that places actions one by one into a "map" and then returns it.
The receiving function will use different "lists" to loop over that map.

Do you recommend QMap, QHash, std::map or std::unordered_map?

For short lived lists, with no inserts or removals, that will be used once in a ranged for loop,
do you recommend QList or std::vector?
I considered a simple array, but I want to just keep reusing the same variable name.

The lists will be used in combination with the map to created toolbars/menues in loops.

example idea:

Qt Code:
  1. vector<string> a_vector;
  2.  
  3. a_vector = {"a1", "a2", "a3"}
  4.  
  5. for (string str : a_vector)
  6. {
  7. a_map[str]->setCheckable(true);
  8. menu->addAction(a_map[str]);
  9. toolbar->addAction(a_map[str]);
  10. }
  11.  
  12. ... menu and toolbar change ...
  13.  
  14. a_vector = {"a4", "a5", "a6", "a7"}
  15.  
  16. for (string str : a_vector)
  17. {
  18. a_map[str]->setCheckable(true);
  19. menu->addAction(a_map[str]);
  20. toolbar->addAction(a_map[str]);
  21. }
To copy to clipboard, switch view to plain text mode