+void String::update_widget()
+{
+ if (!line_edit_)
+ return;
+
+ Glib::VariantBase variant;
+
+ try {
+ variant = getter_();
+ } catch (const sigrok::Error &e) {
+ qWarning() << tr("Querying config key %1 resulted in %2").arg(name_, e.what());
+ return;
+ }
+
+ assert(variant.gobj());
+
+ string value = Glib::VariantBase::cast_dynamic<Glib::Variant<ustring>>(
+ variant).get();
+
+ line_edit_->setText(QString::fromStdString(value));
+}
+