Commit 0bc7ab1a authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Hide tooltip when pressing button

Matches built-in Qt behavior where a tooltip does not show up
while a button is pressed.

More importantly, it avoids showing a tooltip ontop of the global
menu popup when clicking the button quickly before the tooltip
timer has expired.


(cherry picked from commit d30a034e)
parent c213d1a3
Pipeline #140472 passed with stage
in 50 seconds
......@@ -353,6 +353,11 @@ DecorationButton::DecorationButton(DecorationButtonType type, const QPointer<Dec
}
});
connect(this, &DecorationButton::pressedChanged, this, updateSlot);
connect(this, &DecorationButton::pressedChanged, this, [this](bool pressed) {
if (pressed) {
this->decoration()->requestHideToolTip();
}
});
connect(this, &DecorationButton::checkedChanged, this, updateSlot);
connect(this, &DecorationButton::enabledChanged, this, updateSlot);
connect(this, &DecorationButton::visibilityChanged, this, updateSlot);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment