If you set the file path, but have not set the window title, Qt sets the window title to contain a string created using the following components.
If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string.
Чтение документации помогает