Skip to content

Instantly share code, notes, and snippets.

@jherico
Created February 8, 2016 06:29
Show Gist options
  • Save jherico/f3b90e241390413a5e38 to your computer and use it in GitHub Desktop.
Save jherico/f3b90e241390413a5e38 to your computer and use it in GitHub Desktop.
class ComboBoxPreference : public EditPreference {
Q_OBJECT
Q_PROPERTY(QStringList items READ getItems CONSTANT)
public:
ComboBoxPreference(const QString& category, const QString& name, Getter getter, Setter setter)
: EditPreference(category, name, getter, setter) { }
Type getType() { return ComboBox; }
const QStringList& getItems() { return _browseLabel; }
void setItems(const QStringList& items) { _items = items; }
protected:
QStringList _items;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment