file-dialog
Selecting a QFileDialog file and / or folder
How can I put on the button the action of selecting either a file or a folder.
There are options:
QtWidgets.QFileDialog.getEx ... ие
if __name__ == '__main__': # Если запускаем файл напрямую, а не импортируем
main() # то запускаем функцию main()