From 894c4b52fe140cf30a839cf3c7583fea04602683 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 30 Mar 2017 01:11:11 +0200 Subject: [PATCH] binding: Add description tooltips to almost all binding types. This can be the description of an option of an input/output module, for example. --- pv/binding/binding.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pv/binding/binding.cpp b/pv/binding/binding.cpp index 00399c1..ae4f294 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); + } } } -- 2.30.2