wayland qcompleter popup

This commit is contained in:
hanpinlong 2024-06-13 19:40:14 +08:00
parent 818b32888a
commit 46016d0efe
1 changed files with 10 additions and 0 deletions

View File

@ -981,6 +981,16 @@ void QCompleterPrivate::showPopup(const QRect& rect)
if (!popup->isVisible())
popup->show();
#ifndef NO_FOR_WAYLAND
QWindow *win = widget->windowHandle();
if (!win) {
QWidget *parentWidget = widget->nativeParentWidget();
if (parentWidget)
win = parentWidget->windowHandle();
}
if (win)
popup->windowHandle()->setTransientParent(win);
#endif
}
#if QT_CONFIG(filesystemmodel)