This utility function can be used to populate a Qt control which is
backed by some QAbstractItemModel with a list of strings. E.g. this can
be used to populate a QComboBox or any QAbstractItemView with some
items.
This is very useful since in many cases, the methods for adding elements
to such controls are neither slots, nor marked with Q_INVOKABLE and such
unreachable from the script code.
Change-Id: I2195f41e53765ef3a798477ed08d8f09ab5c4379
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Text was copied from packagemanagergui.cpp.
Change-Id: Idca8ce779bd5a3dbf5b3e7e4eca085c82973447e
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>