QuantitySpinBox: add function to set/change tooltip at runtime

This commit is contained in:
donovaly
2020-01-06 17:22:04 +01:00
committed by Yorik van Havre
parent 8af503e330
commit 65acf2371e
2 changed files with 14 additions and 0 deletions

View File

@@ -290,6 +290,16 @@ void Gui::QuantitySpinBox::setExpression(boost::shared_ptr<Expression> expr)
}
}
void Gui::QuantitySpinBox::setTooltipLE(const QString &name)
{
lineEdit()->setToolTip(name);
}
void Gui::QuantitySpinBox::setTooltipIL(const QString &name)
{
iconLabel->setToolTip(name);
}
QString QuantitySpinBox::boundToName() const
{
if (isBound()) {

View File

@@ -129,6 +129,10 @@ public:
bool event(QEvent *event);
void setExpression(boost::shared_ptr<App::Expression> expr);
/// Sets a tooltip for the LineEdit
void setTooltipLE(const QString &name);
/// Sets a tooltip for the IconLabel
void setTooltipIL(const QString &name);
void bind(const App::ObjectIdentifier &_path);
bool apply(const std::string &propName);