Since QColor can fit into QVariant, you should (not sure, didn't test) be able to just use QVariantList for your color settings and save the list directly:

Qt Code:
  1. QSettings settings;
  2. QVariantList colorList = myColorList();
  3. settings.setValue("currentColorVector", colorList);
To copy to clipboard, switch view to plain text mode