From d700744052d133f426172243d4eef6ea948e3175 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 9 Jan 2020 22:39:47 +0100 Subject: [PATCH] fixes 0004059: Tooltips for Gui::QuantitySpinBox not showing [skip ci] --- src/Gui/QuantitySpinBox.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 8e419d0045..b2c5d1475e 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -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(event); @@ -859,6 +869,7 @@ bool QuantitySpinBox::event(QEvent * event) return true; } } +#endif return QAbstractSpinBox::event(event); }