This can be the description of an option of an input/output module,
for example.
#include <cassert>
#include <QFormLayout>
+#include <QLabel>
#include <pv/prop/property.hpp>
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);
+ }
}
}