this is hardly a topic for the programming forum -> moved.

Inside the docs you have a wonderful example of what you want. Search! QComboBox::setModel().