If you omit the argument (or pass in an empty string), the dialog should remember the last directory:
讯享网
The tr function is used for translating user-visible strings. You can omit it if you won’t ever be providing translations for your application.
EDIT:
It seems that the start directory may not be automatically remembered on all platforms/desktops, depending on whether you use the native dialog or not. If Qt’s built-in dialog is used, the start directory should always be automatically remebered on all platforms (even between invokations of the application). To try the non-native dialog, do:
讯享网
Alternatively, you can use the QFileDialog constructor, which will always create a non-native dialog:

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/169884.html