'PyQt6 QFileDialog.getSaveFileName unsusual response

I am upgrading a project from PyQt5 to PyQt6. I have getting a strange response when obtaining a filepath to save a file, using PyQt6.

I have checked the directory value: /home/cc/Desktop.

I enter 'test' into the dialog.

path = QtWidgets.QFileDialog.getSaveFileName(self, "Enter name", directory)                                              

The path tuple returns: ('/run/user/1000/doc/3871d7e4/test', '') but should return ('/home/cc/Desktop/test', '')

Any advice ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source