+ Glib::VariantBase variant = getter_();
+ if (!variant.gobj())
+ return nullptr;
+
+ selector_ = new QComboBox(parent);
+ for (unsigned int i = 0; i < values_.size(); i++) {
+ const pair<Glib::VariantBase, QString> &v = values_[i];
+ selector_->addItem(v.second, qVariantFromValue(v.first));
+ if (v.first.equal(variant))
+ selector_->setCurrentIndex(i);
+ }
+
+ if (auto_commit)
+ connect(selector_, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(on_current_item_changed(int)));
+
+ return selector_;