+void Bool::update_widget()
+{
+ if (!check_box_)
+ 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());
+ bool value = Glib::VariantBase::cast_dynamic<Glib::Variant<bool>>(
+ variant).get();
+
+ check_box_->setCheckState(value ? Qt::Checked : Qt::Unchecked);
+}
+