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();
|
tooltipDialogInstance()->dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToolTip::hideImmediately()
|
||||||
|
{
|
||||||
|
m_showTimer->stop();
|
||||||
|
tooltipDialogInstance()->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
QVariant ToolTip::icon() const
|
QVariant ToolTip::icon() const
|
||||||
{
|
{
|
||||||
if (m_icon.isValid()) {
|
if (m_icon.isValid()) {
|
||||||
|
|
|
@ -164,10 +164,16 @@ public Q_SLOTS:
|
||||||
void showToolTip();
|
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();
|
void hideToolTip();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides the tooltip immediately, in comparison to hideToolTip.
|
||||||
|
* @since 5.84
|
||||||
|
*/
|
||||||
|
void hideImmediately();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// @cond INTERNAL_DOCS
|
/// @cond INTERNAL_DOCS
|
||||||
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
|
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user