From: Uwe Hermann Date: Wed, 29 Mar 2017 23:11:11 +0000 (+0200) Subject: binding: Add description tooltips to almost all binding types. X-Git-Tag: pulseview-0.4.0~109 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=894c4b52fe140cf30a839cf3c7583fea04602683;hp=9af565cbd6d2580a60286c4b3de21af6bbcf7e91;ds=sidebyside binding: Add description tooltips to almost all binding types. This can be the description of an option of an input/output module, for example. --- diff --git a/pv/binding/binding.cpp b/pv/binding/binding.cpp index 00399c1d..ae4f2943 100644 --- a/pv/binding/binding.cpp +++ b/pv/binding/binding.cpp @@ -20,6 +20,7 @@ #include #include +#include #include @@ -55,10 +56,13 @@ void Binding::add_properties_to_form(QFormLayout *layout, QWidget *const widget = p->get_widget(layout->parentWidget(), auto_commit); - if (p->labeled_widget()) + if (p->labeled_widget()) { layout->addRow(widget); - else - layout->addRow(p->name(), widget); + } else { + auto *lbl = new QLabel(p->name()); + lbl->setToolTip(p->desc()); + layout->addRow(lbl, widget); + } } }