fixes 0004059: Tooltips for Gui::QuantitySpinBox not showing [skip ci]

This commit is contained in:
wmayer
2020-01-09 22:39:47 +01:00
parent a03244fa1e
commit d700744052

View File

@@ -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);
@@ -859,6 +869,7 @@ bool QuantitySpinBox::event(QEvent * event)
return true;
}
}
#endif
return QAbstractSpinBox::event(event);
}