Remove the window argument to clean up the api. If the window is needed, capture it using a lambda or use sender().