Skip to content

Commit

Permalink
fixes 0004059: Tooltips for Gui::QuantitySpinBox not showing [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 9, 2020
1 parent a03244f commit d700744
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Gui/QuantitySpinBox.cpp
Expand Up @@ -850,6 +850,16 @@ void QuantitySpinBox::showEvent(QShowEvent * event)

bool QuantitySpinBox::event(QEvent * event)
{
// issue #0004059: Tooltips for Gui::QuantitySpinBox not showing
// Here we must not try to show the tooltip of the icon label
// because it would override a custom tooltip set to this widget.
//
// We could also check if the text of this tooltip is empty but
// it will fail in cases where the widget is embedded into the
// property editor and the corresponding item has set a tooltip.
// Instead of showing the item's tooltip it will again show the
// tooltip of the icon label.
#if 0
if (event->type() == QEvent::ToolTip) {
if (isBound() && getExpression() && lineEdit()->isReadOnly()) {
QHelpEvent * helpEvent = static_cast<QHelpEvent*>(event);
Expand All @@ -859,6 +869,7 @@ bool QuantitySpinBox::event(QEvent * event)
return true;
}
}
#endif

return QAbstractSpinBox::event(event);
}
Expand Down

0 comments on commit d700744

Please sign in to comment.