Add function to hide tooltip immediately
The built in delay causes trouble on wayland where it can cause closing of other popups.
This commit is contained in:
parent
ce39def7d1
commit
52b95888d5
@ -256,6 +256,12 @@ void ToolTip::hideToolTip()
|
||||
tooltipDialogInstance()->dismiss();
|
||||
}
|
||||
|
||||
void ToolTip::hideImmediately()
|
||||
{
|
||||
m_showTimer->stop();
|
||||
tooltipDialogInstance()->setVisible(false);
|
||||
}
|
||||
|
||||
QVariant ToolTip::icon() const
|
||||
{
|
||||
if (m_icon.isValid()) {
|
||||
|
@ -164,10 +164,16 @@ public Q_SLOTS:
|
||||
void showToolTip();
|
||||
|
||||
/**
|
||||
* Hides the tooltip if shown. Does not affect whether the tooltip area is active.
|
||||
* Hides the tooltip after a grace period if shown. Does not affect whether the tooltip area is active.
|
||||
*/
|
||||
void hideToolTip();
|
||||
|
||||
/**
|
||||
* Hides the tooltip immediately, in comparison to hideToolTip.
|
||||
* @since 5.84
|
||||
*/
|
||||
void hideImmediately();
|
||||
|
||||
protected:
|
||||
/// @cond INTERNAL_DOCS
|
||||
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
|
||||
|
Loading…
Reference in New Issue
Block a user