diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 59387ae2059..aaf77a52ccb 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -342,8 +342,11 @@ bool LocatorPopup::event(QEvent *event) { if (event->type() == QEvent::ParentChange) updateWindow(); - // completion list resizes after first items are shown --> LayoutRequest - else if (event->type() == QEvent::Show || event->type() == QEvent::LayoutRequest) + else if (event->type() == QEvent::Show) + // make sure the popup has correct position before it becomes visible + updateGeometry(); + else if (event->type() == QEvent::LayoutRequest) + // completion list resizes after first items are shown --> LayoutRequest QTimer::singleShot(0, this, &LocatorPopup::updateGeometry); return QWidget::event(event); }