From 99c48acc8ea5e614e447a8f62d92c8d12e9cf58b Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Thu, 27 Feb 2025 12:07:33 +0200 Subject: [PATCH] dolphinview: Add widget parameter to elided QToolTip::showText Without this parameter the QToolTip can not always determine what is the parent, so it will create a toplevel window in those cases. Make sure we have dolphinview itself as a widget there, so QToolTip and thus QtWayland can resolve what is the parent. This avoids creating random windows when opening a tooltip. BUG:500009 --- src/views/dolphinview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index fc4f5e2df..d5908a081 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -2440,7 +2440,7 @@ bool DolphinView::tryShowNameToolTip(QHelpEvent *event) const KFileItem item = m_model->fileItem(index.value()); const QString text = item.text(); const QPoint pos = mapToGlobal(event->pos()); - QToolTip::showText(pos, text); + QToolTip::showText(pos, text, this); return true; } } -- 2.47.3