diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 1411d5ae43e..f44a28f5636 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1380,7 +1380,7 @@ void QWindowsForeignWindow::setParent(const QPlatformWindow *newParentWindow) qCDebug(lcQpaWindow) << __FUNCTION__ << window() << "newParent=" << newParentWindow << newParent << "oldStyle=" << debugWinStyle(oldStyle); - auto updateWindowFlags = [=]{ + auto updateWindowFlags = [&] { // Top level window flags need to be set/cleared manually. DWORD newStyle = oldStyle; if (isTopLevel) {